Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-21 Thread Andrey Albershteyn
On 2025-05-21 11:36:31, Amir Goldstein wrote: > On Wed, May 21, 2025 at 10:48 AM Andrey Albershteyn > wrote: > > > > On 2025-05-19 21:37:04, Dave Chinner wrote: > > > On Thu, May 15, 2025 at 12:33:31PM +0200, Amir Goldstein wrote: > > > > On Thu, May

Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-21 Thread Andrey Albershteyn
> > > On Tue, May 13, 2025, at 11:17, Andrey Albershteyn wrote: > > > > > > > > > > > > > > long syscall(SYS_file_getattr, int dirfd, const char *pathname, > > > > > struct fsxattr *fsx, size_t size

Re: [PATCH v5 2/7] lsm: introduce new hooks for setting/getting inode fsxattr

2025-05-15 Thread Andrey Albershteyn
On 2025-05-14 11:21:46, Casey Schaufler wrote: > On 5/14/2025 4:02 AM, Andrey Albershteyn wrote: > > On 2025-05-12 08:43:32, Casey Schaufler wrote: > >> On 5/12/2025 6:25 AM, Andrey Albershteyn wrote: > >>> Introduce new hooks for setting and getting filesystem exte

Re: [PATCH v5 2/7] lsm: introduce new hooks for setting/getting inode fsxattr

2025-05-14 Thread Andrey Albershteyn
On 2025-05-12 08:43:32, Casey Schaufler wrote: > On 5/12/2025 6:25 AM, Andrey Albershteyn wrote: > > Introduce new hooks for setting and getting filesystem extended > > attributes on inode (FS_IOC_FSGETXATTR). > > > > Cc: seli...@vger.kernel.org > > Cc: Paul Moo

[PATCH v5 7/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Andrey Albershteyn
From: Andrey Albershteyn Introduce file_getattr and file_setattr 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&#

[PATCH v5 5/7] fs: make vfs_fileattr_[get|set] return -EOPNOSUPP

2025-05-13 Thread Andrey Albershteyn
slate EOPNOSUPP back for current users - overlayfs, encryptfs and fs/ioctl.c. Signed-off-by: Andrey Albershteyn --- fs/ecryptfs/inode.c | 8 +++- fs/file_attr.c | 12 ++-- fs/overlayfs/inode.c | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/fs/ecryptfs/in

[PATCH v5 6/7] fs: prepare for extending file_get/setattr()

2025-05-13 Thread Andrey Albershteyn
and read-only field fsx_nextents to filesystem. These changes should not affect existing chattr programs that use the ioctl to get fsxattr before setting the new values. Link: https://lore.kernel.org/linux-fsdevel/20250216164029.20673-4-p...@kernel.org/ Cc: Pali Rohár Cc: Andrey Albershteyn

[PATCH v5 4/7] fs: split fileattr/fsxattr converters into helpers

2025-05-13 Thread Andrey Albershteyn
This will be helpful for file_get/setattr syscalls to convert between fileattr and fsxattr. Signed-off-by: Andrey Albershteyn Reviewed-by: Jan Kara --- fs/file_attr.c | 32 +--- include/linux/fileattr.h | 2 ++ 2 files changed, 23 insertions(+), 11

[PATCH v5 3/7] selinux: implement inode_file_[g|s]etattr hooks

2025-05-13 Thread Andrey Albershteyn
These hooks are called on inode extended attribute retrieval/change. Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- security/selinux/hooks.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/security/selinux/hooks.c b/security/selinux

[PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Andrey Albershteyn
quot; check - Use CLASS() instead of directly calling fdget/fdput - Link to v2: https://lore.kernel.org/r/20250122-xattrat-syscall-v2-1-5b360d4fb...@kernel.org v1: https://lore.kernel.org/linuxppc-dev/20250109174540.893098-1-aalbe...@kernel.org/ Previous discussion: https://lore.kernel.org/linux-x

[PATCH v5 2/7] lsm: introduce new hooks for setting/getting inode fsxattr

2025-05-13 Thread Andrey Albershteyn
Introduce new hooks for setting and getting filesystem extended attributes on inode (FS_IOC_FSGETXATTR). Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- fs/file_attr.c| 19 --- include/linux/lsm_hook_defs.h | 2 ++ include

[PATCH v5 1/7] fs: split fileattr related helpers into separate file

2025-05-13 Thread Andrey Albershteyn
From: Andrey Albershteyn This patch moves function related to file extended attributes manipulations to separate file. Just refactoring. Signed-off-by: Andrey Albershteyn --- fs/Makefile | 3 +- fs/file_attr.c | 318 +++ fs

Re: [PATCH v5 5/7] fs: make vfs_fileattr_[get|set] return -EOPNOSUPP

2025-05-12 Thread Andrey Albershteyn
On 2025-05-12 15:22:52, Andrey Albershteyn wrote: > Future patches will add new syscalls which use these functions. As > this interface won't be used for ioctls only the EOPNOSUPP is more > appropriate return code. > > This patch coverts return code from ENOIOCTL

Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-12 Thread Andrey Albershteyn
On 2025-05-12 15:25:11, Andrey Albershteyn wrote: > This patchset introduced two new syscalls file_getattr() and > file_setattr(). These syscalls are similar to FS_IOC_FSSETXATTR ioctl() > except they use *at() semantics. Therefore, there's no need to open the > file to get

Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-12 Thread Andrey Albershteyn
On 2025-05-12 15:18:53, Andrey Albershteyn wrote: > This patchset introduced two new syscalls file_getattr() and > file_setattr(). These syscalls are similar to FS_IOC_FSSETXATTR ioctl() > except they use *at() semantics. Therefore, there's no need to open the > file to get

[PATCH v5 4/7] fs: split fileattr/fsxattr converters into helpers

2025-05-12 Thread Andrey Albershteyn
This will be helpful for file_get/setattr syscalls to convert between fileattr and fsxattr. Signed-off-by: Andrey Albershteyn Reviewed-by: Jan Kara --- fs/file_attr.c | 32 +--- include/linux/fileattr.h | 2 ++ 2 files changed, 23 insertions(+), 11

[PATCH v5 2/7] lsm: introduce new hooks for setting/getting inode fsxattr

2025-05-12 Thread Andrey Albershteyn
Introduce new hooks for setting and getting filesystem extended attributes on inode (FS_IOC_FSGETXATTR). Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- fs/file_attr.c| 19 --- include/linux/lsm_hook_defs.h | 2 ++ include

[PATCH v5 1/7] fs: split fileattr related helpers into separate file

2025-05-12 Thread Andrey Albershteyn
From: Andrey Albershteyn This patch moves function related to file extended attributes manipulations to separate file. Just refactoring. Signed-off-by: Andrey Albershteyn --- fs/Makefile | 3 +- fs/file_attr.c | 318 +++ fs

[PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-12 Thread Andrey Albershteyn
quot; check - Use CLASS() instead of directly calling fdget/fdput - Link to v2: https://lore.kernel.org/r/20250122-xattrat-syscall-v2-1-5b360d4fb...@kernel.org v1: https://lore.kernel.org/linuxppc-dev/20250109174540.893098-1-aalbe...@kernel.org/ Previous discussion: https://lore.kernel.org/linux-x

[PATCH v5 5/7] fs: make vfs_fileattr_[get|set] return -EOPNOSUPP

2025-05-12 Thread Andrey Albershteyn
slate EOPNOSUPP back for current users - overlayfs, encryptfs and fs/ioctl.c. Signed-off-by: Andrey Albershteyn --- fs/ecryptfs/inode.c | 8 +++- fs/file_attr.c | 12 ++-- fs/overlayfs/inode.c | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/fs/ecryptfs/in

[PATCH v5 1/7] fs: split fileattr related helpers into separate file

2025-05-12 Thread Andrey Albershteyn
From: Andrey Albershteyn This patch moves function related to file extended attributes manipulations to separate file. Just refactoring. Signed-off-by: Andrey Albershteyn --- fs/Makefile | 3 +- fs/file_attr.c | 318 +++ fs

[PATCH v5 3/7] selinux: implement inode_file_[g|s]etattr hooks

2025-05-12 Thread Andrey Albershteyn
These hooks are called on inode extended attribute retrieval/change. Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- security/selinux/hooks.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/security/selinux/hooks.c b/security/selinux

[PATCH v5 2/7] lsm: introduce new hooks for setting/getting inode fsxattr

2025-05-12 Thread Andrey Albershteyn
Introduce new hooks for setting and getting filesystem extended attributes on inode (FS_IOC_FSGETXATTR). Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- fs/file_attr.c| 19 --- include/linux/lsm_hook_defs.h | 2 ++ include

[PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-12 Thread Andrey Albershteyn
quot; check - Use CLASS() instead of directly calling fdget/fdput - Link to v2: https://lore.kernel.org/r/20250122-xattrat-syscall-v2-1-5b360d4fb...@kernel.org v1: https://lore.kernel.org/linuxppc-dev/20250109174540.893098-1-aalbe...@kernel.org/ Previous discussion: https://lore.kernel.org/linux-x

Re: [PATCH v4 3/3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-04-25 Thread Andrey Albershteyn
On 2025-04-22 17:14:10, Christian Brauner wrote: > On Tue, Apr 22, 2025 at 04:31:29PM +0200, Christian Brauner wrote: > > On Thu, Mar 27, 2025 at 12:39:28PM +0100, Amir Goldstein wrote: > > > On Thu, Mar 27, 2025 at 10:33 AM Andrey Albershteyn > > > wrote: > > &

Re: [PATCH v4 3/3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-04-24 Thread Andrey Albershteyn
On 2025-04-24 11:06:07, Christian Brauner wrote: > On Wed, Apr 23, 2025 at 11:53:25AM +0200, Jan Kara wrote: > > On Tue 22-04-25 16:59:02, Christian Brauner wrote: > > > On Fri, Mar 21, 2025 at 08:48:42PM +0100, Andrey Albershteyn wrote: > > > > From: Andrey Albershte

Re: [PATCH v4 3/3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-03-27 Thread Andrey Albershteyn
On 2025-03-23 09:56:25, Amir Goldstein wrote: > On Fri, Mar 21, 2025 at 8:49 PM Andrey Albershteyn > wrote: > > > > From: Andrey Albershteyn > > > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > > extended attributes/flags. The s

Re: [PATCH v4 1/3] lsm: introduce new hooks for setting/getting inode fsxattr

2025-03-27 Thread Andrey Albershteyn
On 2025-03-24 20:27:02, Mickaël Salaün wrote: > On Fri, Mar 21, 2025 at 05:32:25PM -0400, Paul Moore wrote: > > On Mar 21, 2025 Andrey Albershteyn wrote: > > > > > > Introduce new hooks for setting and getting filesystem extended > > > attributes on inode

[PATCH v4 2/3] fs: split fileattr/fsxattr converters into helpers

2025-03-21 Thread Andrey Albershteyn
This will be helpful for get/setfsxattrat syscalls to convert between fileattr and fsxattr. Signed-off-by: Andrey Albershteyn --- fs/ioctl.c | 32 +--- include/linux/fileattr.h | 2 ++ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/fs

[PATCH v4 3/3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-03-21 Thread Andrey Albershteyn
From: Andrey Albershteyn 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&#

[PATCH v4 0/3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-03-21 Thread Andrey Albershteyn
ilesystem" check - Use CLASS() instead of directly calling fdget/fdput - Link to v2: https://lore.kernel.org/r/20250122-xattrat-syscall-v2-1-5b360d4fb...@kernel.org v1: https://lore.kernel.org/linuxppc-dev/20250109174540.893098-1-aalbe...@kernel.org/ Previous discussion: https://lore.ker

[PATCH v4 1/3] lsm: introduce new hooks for setting/getting inode fsxattr

2025-03-21 Thread Andrey Albershteyn
Introduce new hooks for setting and getting filesystem extended attributes on inode (FS_IOC_FSGETXATTR). Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- fs/ioctl.c| 7 ++- include/linux/lsm_hook_defs.h | 4 include/linux

Re: [PATCH v3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-02-28 Thread Andrey Albershteyn
On 2025-02-21 20:15:24, Amir Goldstein wrote: > On Fri, Feb 21, 2025 at 7:13 PM Darrick J. Wong wrote: > > > > On Tue, Feb 11, 2025 at 06:22:47PM +0100, Andrey Albershteyn wrote: > > > From: Andrey Albershteyn > > > > > > Introduce getfsxattrat and

Re: [PATCH v3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-02-24 Thread Andrey Albershteyn
On 2025-02-24 11:54:34, Jan Kara wrote: > On Tue 11-02-25 18:22:47, Andrey Albershteyn wrote: > > From: Andrey Albershteyn > > > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > > extended attributes/flags. The syscalls take parent directory f

Re: [PATCH v3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-02-24 Thread Andrey Albershteyn
On 2025-02-24 12:32:17, Christian Brauner wrote: > On Fri, Feb 21, 2025 at 08:15:24PM +0100, Amir Goldstein wrote: > > On Fri, Feb 21, 2025 at 7:13 PM Darrick J. Wong wrote: > > > > > > On Tue, Feb 11, 2025 at 06:22:47PM +0100, Andrey Albershteyn wrote: >

Re: [PATCH v3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-02-24 Thread Andrey Albershteyn
_capable via vfs_fileattr_set). > > On Tue, Feb 11, 2025 at 06:22:47PM +0100, Andrey Albershteyn wrote: > > From: Andrey Albershteyn > > > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > > extended attributes/flags. The syscalls take parent directory

Re: [PATCH v3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-02-18 Thread Andrey Albershteyn
Got more comments below with private mail: On 2025-02-11 18:22:47, Andrey Albershteyn wrote: > From: Andrey Albershteyn > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > extended attributes/flags. The syscalls take parent directory fd and > path to the

[PATCH v3] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-02-11 Thread Andrey Albershteyn
From: Andrey Albershteyn 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&#

Re: [PATCH v2] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-01-29 Thread Andrey Albershteyn
On 2025-01-24 10:33:54, Christian Brauner wrote: > On Wed, Jan 22, 2025 at 03:18:34PM +0100, Andrey Albershteyn wrote: > > From: Andrey Albershteyn > > > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > > extended attributes/flags. The syscal

[PATCH v2] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-01-22 Thread Andrey Albershteyn
From: Andrey Albershteyn 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&#

Re: [PATCH] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-01-13 Thread Andrey Albershteyn
On 2025-01-13 12:19:36, Jan Kara wrote: > On Thu 09-01-25 18:45:40, Andrey Albershteyn wrote: > > From: Andrey Albershteyn > > > > Introduce getfsxattrat and setfsxattrat syscalls to manipulate inode > > extended attributes/flags. The syscalls take parent directory F

Re: [PATCH] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-01-10 Thread Andrey Albershteyn
On 2025-01-09 20:59:45, Arnd Bergmann wrote: > On Thu, Jan 9, 2025, at 18:45, Andrey Albershteyn wrote: > > > > arch/alpha/kernel/syscalls/syscall.tbl | 2 + > > arch/m68k/kernel/syscalls/syscall.tbl | 2 + > > arch/microblaze/kernel/syscalls/syscall.t

[PATCH] fs: introduce getfsxattrat and setfsxattrat syscalls

2025-01-09 Thread Andrey Albershteyn
From: Andrey Albershteyn 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&#