Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-19 Thread Greg Kurz
On Tue, 11 Apr 2017 15:09:40 -0400 Colin Walters wrote: > On Tue, Apr 11, 2017, at 02:07 PM, Eric Blake wrote: > > > > A good idea on the surface. But reading the man page of openat(), the > > section on O_PATH says: > >The file > > itself is not opened,

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-19 Thread Greg Kurz
On Tue, 11 Apr 2017 15:09:40 -0400 Colin Walters wrote: > On Tue, Apr 11, 2017, at 02:07 PM, Eric Blake wrote: > > > > A good idea on the surface. But reading the man page of openat(), the > > section on O_PATH says: > >The file > > itself is not opened, and other file

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Colin Walters
On Tue, Apr 11, 2017, at 02:07 PM, Eric Blake wrote: > > A good idea on the surface. But reading the man page of openat(), the > section on O_PATH says: >The file > itself is not opened, and other file operations (e.g., > read(2), > write(2), fchmod(2),

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Colin Walters
On Tue, Apr 11, 2017, at 02:07 PM, Eric Blake wrote: > > A good idea on the surface. But reading the man page of openat(), the > section on O_PATH says: >The file > itself is not opened, and other file operations (e.g., > read(2), > write(2), fchmod(2),

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Eric Blake
On 04/11/2017 01:07 PM, Eric Blake wrote: > > But even if using open(O_PATH)/fchmod() works, it is not immediately > obvious whether it can catch all the same cases that chmodat(O_NOFOLLOW) Typo; I obviously meant fchmodat(AT_SYMLINK_NOFOLLOW) > would cover, as there are cases where you have

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Eric Blake
On 04/11/2017 01:07 PM, Eric Blake wrote: > > But even if using open(O_PATH)/fchmod() works, it is not immediately > obvious whether it can catch all the same cases that chmodat(O_NOFOLLOW) Typo; I obviously meant fchmodat(AT_SYMLINK_NOFOLLOW) > would cover, as there are cases where you have

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Eric Blake
On 04/11/2017 12:55 PM, Eric Blake wrote: > On 04/11/2017 12:52 PM, Colin Walters wrote: >> >> >> On Tue, Feb 28, 2017, at 02:23 PM, Eric Blake wrote: >> >>> Might also be worth mentioning that this patch is required in order to >>> solve CVE-2016-9602, per discussion at >>>

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Eric Blake
On 04/11/2017 12:55 PM, Eric Blake wrote: > On 04/11/2017 12:52 PM, Colin Walters wrote: >> >> >> On Tue, Feb 28, 2017, at 02:23 PM, Eric Blake wrote: >> >>> Might also be worth mentioning that this patch is required in order to >>> solve CVE-2016-9602, per discussion at >>>

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Eric Blake
On 04/11/2017 12:52 PM, Colin Walters wrote: > > > On Tue, Feb 28, 2017, at 02:23 PM, Eric Blake wrote: > >> Might also be worth mentioning that this patch is required in order to >> solve CVE-2016-9602, per discussion at >> https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06089.html >

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Eric Blake
On 04/11/2017 12:52 PM, Colin Walters wrote: > > > On Tue, Feb 28, 2017, at 02:23 PM, Eric Blake wrote: > >> Might also be worth mentioning that this patch is required in order to >> solve CVE-2016-9602, per discussion at >> https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06089.html >

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Colin Walters
On Tue, Feb 28, 2017, at 02:23 PM, Eric Blake wrote: > Might also be worth mentioning that this patch is required in order to > solve CVE-2016-9602, per discussion at > https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06089.html I only briefly looked at this, but can't `open(...,

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Colin Walters
On Tue, Feb 28, 2017, at 02:23 PM, Eric Blake wrote: > Might also be worth mentioning that this patch is required in order to > solve CVE-2016-9602, per discussion at > https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg06089.html I only briefly looked at this, but can't `open(...,

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Greg Kurz
On Tue, 11 Apr 2017 13:39:37 +0200 Greg Kurz wrote: > On Wed, 1 Mar 2017 10:01:53 +0100 > Michael Kerrisk wrote: > > > [CC += linux-...@vger.kernel.org] > > > > Hello Greg, > > > > Since this is a kernel-user-space API change, please CC linux-api@. > >

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Greg Kurz
On Tue, 11 Apr 2017 13:39:37 +0200 Greg Kurz wrote: > On Wed, 1 Mar 2017 10:01:53 +0100 > Michael Kerrisk wrote: > > > [CC += linux-...@vger.kernel.org] > > > > Hello Greg, > > > > Since this is a kernel-user-space API change, please CC linux-api@. > > The kernel source file

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Greg Kurz
On Wed, 1 Mar 2017 10:01:53 +0100 Michael Kerrisk wrote: > [CC += linux-...@vger.kernel.org] > > Hello Greg, > > Since this is a kernel-user-space API change, please CC linux-api@. > The kernel source file Documentation/SubmitChecklist notes that all > Linux kernel

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-04-11 Thread Greg Kurz
On Wed, 1 Mar 2017 10:01:53 +0100 Michael Kerrisk wrote: > [CC += linux-...@vger.kernel.org] > > Hello Greg, > > Since this is a kernel-user-space API change, please CC linux-api@. > The kernel source file Documentation/SubmitChecklist notes that all > Linux kernel patches that change

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-03-01 Thread Greg Kurz
On Tue, 28 Feb 2017 12:23:01 -0600 Eric Blake wrote: > On 02/28/2017 11:03 AM, Greg Kurz wrote: > > According to the POSIX.1-2008 manual page [1], the fchmodat() function has > > a flag argument which may be passed the following value: > > > > AT_SYMLINK_NOFOLLOW > > If

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-03-01 Thread Greg Kurz
On Tue, 28 Feb 2017 12:23:01 -0600 Eric Blake wrote: > On 02/28/2017 11:03 AM, Greg Kurz wrote: > > According to the POSIX.1-2008 manual page [1], the fchmodat() function has > > a flag argument which may be passed the following value: > > > > AT_SYMLINK_NOFOLLOW > > If path names a

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-03-01 Thread Eric Blake
On 02/28/2017 12:41 PM, Greg Kurz wrote: >>> +++ b/include/linux/syscalls.h >>> @@ -775,6 +775,8 @@ asmlinkage long sys_futimesat(int dfd, const char >>> __user *filename, >>> asmlinkage long sys_faccessat(int dfd, const char __user *filename, int >>> mode); >>> asmlinkage long

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-03-01 Thread Eric Blake
On 02/28/2017 12:41 PM, Greg Kurz wrote: >>> +++ b/include/linux/syscalls.h >>> @@ -775,6 +775,8 @@ asmlinkage long sys_futimesat(int dfd, const char >>> __user *filename, >>> asmlinkage long sys_faccessat(int dfd, const char __user *filename, int >>> mode); >>> asmlinkage long

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-03-01 Thread Michael Kerrisk
[CC += linux-...@vger.kernel.org] Hello Greg, Since this is a kernel-user-space API change, please CC linux-api@. The kernel source file Documentation/SubmitChecklist notes that all Linux kernel patches that change userspace interfaces should be CCed to linux-...@vger.kernel.org, so that the

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-03-01 Thread Michael Kerrisk
[CC += linux-...@vger.kernel.org] Hello Greg, Since this is a kernel-user-space API change, please CC linux-api@. The kernel source file Documentation/SubmitChecklist notes that all Linux kernel patches that change userspace interfaces should be CCed to linux-...@vger.kernel.org, so that the

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-02-28 Thread Eric Blake
On 02/28/2017 11:03 AM, Greg Kurz wrote: > According to the POSIX.1-2008 manual page [1], the fchmodat() function has > a flag argument which may be passed the following value: > > AT_SYMLINK_NOFOLLOW > If path names a symbolic link, then the mode of the symbolic link is > changed. > >

Re: [PATCH 1/2] vfs: implement fchmodat2() syscall

2017-02-28 Thread Eric Blake
On 02/28/2017 11:03 AM, Greg Kurz wrote: > According to the POSIX.1-2008 manual page [1], the fchmodat() function has > a flag argument which may be passed the following value: > > AT_SYMLINK_NOFOLLOW > If path names a symbolic link, then the mode of the symbolic link is > changed. > >

[PATCH 1/2] vfs: implement fchmodat2() syscall

2017-02-28 Thread Greg Kurz
According to the POSIX.1-2008 manual page [1], the fchmodat() function has a flag argument which may be passed the following value: AT_SYMLINK_NOFOLLOW If path names a symbolic link, then the mode of the symbolic link is changed. and the following error may be returned: [EOPNOTSUPP]

[PATCH 1/2] vfs: implement fchmodat2() syscall

2017-02-28 Thread Greg Kurz
According to the POSIX.1-2008 manual page [1], the fchmodat() function has a flag argument which may be passed the following value: AT_SYMLINK_NOFOLLOW If path names a symbolic link, then the mode of the symbolic link is changed. and the following error may be returned: [EOPNOTSUPP]