On Tue, Mar 2, 2021 at 1:49 PM Miklos Szeredi <mszeredi@xxxxxxxxxx> wrote: > > Hi Al, > > Would you mind taking a look? > > Git tree for complete series rebased on v5.12-rc1 can be found at: > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git#miscattr_v2 > > Thanks, > Miklos > > --- > From: Miklos Szeredi <mszeredi@xxxxxxxxxx> > Date: Tue, 2 Mar 2021 13:38:22 +0100 > Subject: vfs: add miscattr ops > > There's a substantial amount of boilerplate in filesystems handling > FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. > > Also due to userspace buffers being involved in the ioctl API this is > difficult to stack, as shown by overlayfs issues related to these ioctls. > > Introduce a new internal API named "miscattr" (fsxattr can be confused with > xattr, xflags is inappropriate, since this is more than just flags). > > There's significant overlap between flags and xflags and this API handles > the conversions automatically, so filesystems may choose which one to use. > > In ->miscattr_get() a hint is provided to the filesystem whether flags or > xattr are being requested by userspace, but in this series this hint is > ignored by all filesystems, since generating all the attributes is cheap. > > If a filesystem doesn't implemement the miscattr API, just fall back to > f_op->ioctl(). When all filesystems are converted, the fallback can be > removed. > > 32bit compat ioctls are now handled by the generic code as well. > > Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx> Ping? Thanks, Miklos