On Tue, Feb 11, 2025, at 18:22, Andrey Albershteyn wrote: > From: Andrey Albershteyn <[email protected]> > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > extended attributes/flags. The syscalls take parent directory fd and > path to the child together with struct fsxattr. > > This is an alternative to FS_IOC_FSSETXATTR ioctl with a difference > that file don't need to be open as we can reference it with a path > instead of fd. By having this we can manipulated inode extended > attributes not only on regular files but also on special ones. This > is not possible with FS_IOC_FSSETXATTR ioctl as with special files > we can not call ioctl() directly on the filesystem inode using fd. > > This patch adds two new syscalls which allows userspace to get/set > extended inode attributes on special files by using parent directory > and a path - *at() like syscall. > > Also, as vfs_fileattr_set() is now will be called on special files > too, let's forbid any other attributes except projid and nextents > (symlink can have an extent). > > CC: [email protected] > CC: [email protected] > CC: [email protected] > Signed-off-by: Andrey Albershteyn <[email protected]>
I checked the syscall.tbl additions and the ABI to ensure that it follows the usual guidelines and is portable across all architectures, this looks good. Thanks for addressing my v1 comments: Acked-by: Arnd Bergmann <[email protected]> Disclaimer: I have no idea if the new syscalls are a good idea or if they are fit for the purpose, I trust the VFS maintainers will take care of reviewing that.
