Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-14 Thread Richard W.M. Jones
On Thu, Apr 14, 2016 at 09:09:38AM +1000, Stephen Rothwell wrote: > Hi Richard, > > On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" > wrote: > > > > It's not possible to read the process umask without also modifying it, > > which is what umask(2) does. A library

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-14 Thread Richard W.M. Jones
On Thu, Apr 14, 2016 at 09:09:38AM +1000, Stephen Rothwell wrote: > Hi Richard, > > On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" > wrote: > > > > It's not possible to read the process umask without also modifying it, > > which is what umask(2) does. A library cannot read umask

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Stephen Rothwell
Hi Richard, On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" wrote: > > It's not possible to read the process umask without also modifying it, > which is what umask(2) does. A library cannot read umask safely, > especially if the main program might be multithreaded.

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Stephen Rothwell
Hi Richard, On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" wrote: > > It's not possible to read the process umask without also modifying it, > which is what umask(2) does. A library cannot read umask safely, > especially if the main program might be multithreaded. I was wondering if

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 10:45:05PM +0200, Florian Weimer wrote: > * H. Peter Anvin: > > > I have to say I'm skeptic to the need for umask2() as opposed to > > getumask(). > > I find the extension with a set-the-thread umask somewhat unlikely. > How would a potential per-thread umask interact

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 10:45:05PM +0200, Florian Weimer wrote: > * H. Peter Anvin: > > > I have to say I'm skeptic to the need for umask2() as opposed to > > getumask(). > > I find the extension with a set-the-thread umask somewhat unlikely. > How would a potential per-thread umask interact

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Florian Weimer
* H. Peter Anvin: > I have to say I'm skeptic to the need for umask2() as opposed to > getumask(). I find the extension with a set-the-thread umask somewhat unlikely. How would a potential per-thread umask interact with CLONE_FS? Have a per-thread umask that, when active, overrides the global

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Florian Weimer
* H. Peter Anvin: > I have to say I'm skeptic to the need for umask2() as opposed to > getumask(). I find the extension with a set-the-thread umask somewhat unlikely. How would a potential per-thread umask interact with CLONE_FS? Have a per-thread umask that, when active, overrides the global

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread H. Peter Anvin
On 04/13/16 12:05, Richard W.M. Jones wrote: v3 -> v4: - Rename the syscall: getumask becomes umask2. - Add flags parameter, with one flag (UMASK_GET_MASK). - Expand the rationale for this change in the first commit message. It's not possible to read the process umask without also

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread H. Peter Anvin
On 04/13/16 12:05, Richard W.M. Jones wrote: v3 -> v4: - Rename the syscall: getumask becomes umask2. - Add flags parameter, with one flag (UMASK_GET_MASK). - Expand the rationale for this change in the first commit message. It's not possible to read the process umask without also

umask2 man page (was: Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask])

2016-04-13 Thread Richard W.M. Jones
UMASK(2) Linux Programmer's Manual UMASK(2) NAME umask, umask2 - get and set file mode creation mask SYNOPSIS #include #include mode_t umask(mode_t mask); #define _GNU_SOURCE #include #include

umask2 man page (was: Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask])

2016-04-13 Thread Richard W.M. Jones
UMASK(2) Linux Programmer's Manual UMASK(2) NAME umask, umask2 - get and set file mode creation mask SYNOPSIS #include #include mode_t umask(mode_t mask); #define _GNU_SOURCE #include #include

[PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Richard W.M. Jones
v3 -> v4: - Rename the syscall: getumask becomes umask2. - Add flags parameter, with one flag (UMASK_GET_MASK). - Expand the rationale for this change in the first commit message. - Add a selftest. - Retest everything. It's not possible to read the process umask

[PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Richard W.M. Jones
v3 -> v4: - Rename the syscall: getumask becomes umask2. - Add flags parameter, with one flag (UMASK_GET_MASK). - Expand the rationale for this change in the first commit message. - Add a selftest. - Retest everything. It's not possible to read the process umask