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

2025-02-25 Thread Pali Rohár
On Tuesday 25 February 2025 07:59:26 Darrick J. Wong wrote: > On Tue, Feb 25, 2025 at 12:24:08PM +0100, Christian Brauner wrote: > > On Tue, Feb 25, 2025 at 11:40:51AM +0100, Arnd Bergmann wrote: > > > On Tue, Feb 25, 2025, at 11:22, Christian Brauner wrote: > > > > On Tue, Feb 25, 2025 at 09:02:04

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

2025-02-25 Thread Darrick J. Wong
On Tue, Feb 25, 2025 at 12:24:08PM +0100, Christian Brauner wrote: > On Tue, Feb 25, 2025 at 11:40:51AM +0100, Arnd Bergmann wrote: > > On Tue, Feb 25, 2025, at 11:22, Christian Brauner wrote: > > > On Tue, Feb 25, 2025 at 09:02:04AM +0100, Arnd Bergmann wrote: > > >> On Mon, Feb 24, 2025, at 12:32

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

2025-02-25 Thread Christian Brauner
On Tue, Feb 25, 2025 at 11:40:51AM +0100, Arnd Bergmann wrote: > On Tue, Feb 25, 2025, at 11:22, Christian Brauner wrote: > > On Tue, Feb 25, 2025 at 09:02:04AM +0100, Arnd Bergmann wrote: > >> On Mon, Feb 24, 2025, at 12:32, Christian Brauner wrote: > >> > >> The ioctl interface relies on the exi

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

2025-02-25 Thread Arnd Bergmann
On Tue, Feb 25, 2025, at 11:22, Christian Brauner wrote: > On Tue, Feb 25, 2025 at 09:02:04AM +0100, Arnd Bergmann wrote: >> On Mon, Feb 24, 2025, at 12:32, Christian Brauner wrote: >> >> The ioctl interface relies on the existing behavior, see >> 0a6eab8bd4e0 ("vfs: support FS_XFLAG_COWEXTSIZE an

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

2025-02-25 Thread Christian Brauner
On Tue, Feb 25, 2025 at 09:02:04AM +0100, Arnd Bergmann wrote: > On Mon, Feb 24, 2025, at 12:32, 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: > > >> > > @@ -23,6 +23,9 @@ > >> > > #include

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

2025-02-25 Thread Arnd Bergmann
On Mon, Feb 24, 2025, at 12:32, 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: >> > > @@ -23,6 +23,9 @@ >> > > #include >> > > #include >> > > #include >> > > +#include >> > > +#include >

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

2025-02-24 Thread Paul Moore
On Mon, Feb 24, 2025 at 11:00 AM Andrey Albershteyn wrote: > On 2025-02-21 16:08:33, Mickaël Salaün wrote: > > It looks security checks are missing. With IOCTL commands, file > > permissions are checked at open time, but with these syscalls the path > > is only resolved but no specific access see

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 fd and > > path to the child to

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: > > > > From: Andrey Albershteyn > > > > >

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

2025-02-24 Thread Andrey Albershteyn
On 2025-02-21 16:08:33, Mickaël Salaün wrote: > It looks security checks are missing. With IOCTL commands, file > permissions are checked at open time, but with these syscalls the path > is only resolved but no specific access seems to be checked (except > inode_owner_or_capable via vfs_fileattr_s

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

2025-02-24 Thread Christian Brauner
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: > > > From: Andrey Albershteyn > > > > > > Introduce getfsxattrat and setfsxattrat syscalls to manip

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

2025-02-24 Thread Jan Kara
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 fd and > path to the child together with struct fsxattr. > > This is an alternat

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

2025-02-21 Thread Paul Moore
On Fri, Feb 21, 2025 at 10:08 AM Mickaël Salaün wrote: > > It looks security checks are missing. With IOCTL commands, file > permissions are checked at open time, but with these syscalls the path > is only resolved but no specific access seems to be checked (except > inode_owner_or_capable via vf

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

2025-02-21 Thread Andreas Dilger
On Feb 21, 2025, at 11:11 AM, Darrick J. Wong wrote: > > 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 fd

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

2025-02-21 Thread Amir Goldstein
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 setfsxattrat syscalls to manipulate inode > > extended attributes/flags. The syscalls take parent director

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

2025-02-21 Thread Darrick J. Wong
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 fd and > path to the child together with struct fsxattr. > > Thi

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

2025-02-21 Thread Mickaël Salaün
It looks security checks are missing. With IOCTL commands, file permissions are checked at open time, but with these syscalls the path is only resolved but no specific access seems to be checked (except inode_owner_or_capable via vfs_fileattr_set). On Tue, Feb 11, 2025 at 06:22:47PM +0100, Andrey

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 child together wit

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

2025-02-11 Thread Arnd Bergmann
On Tue, Feb 11, 2025, at 18:22, 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 child together with struct fsxattr. > > This is an alte

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

2025-02-11 Thread H. Peter Anvin
On February 11, 2025 9:22:47 AM PST, 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 child together with struct fsxattr. > >This is an al

[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't n