Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
Hello Andreas, On 04/21/2017 08:16 PM, Andreas Dilger wrote: > On Apr 21, 2017, at 7:13 AM, Michael Kerrisk (man-pages) > wrote: >> >> On 04/21/2017 03:01 PM, David Howells wrote: >>> Michael Kerrisk (man-pages) wrote: >> >>> (3) There's no

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
Hello Andreas, On 04/21/2017 08:16 PM, Andreas Dilger wrote: > On Apr 21, 2017, at 7:13 AM, Michael Kerrisk (man-pages) > wrote: >> >> On 04/21/2017 03:01 PM, David Howells wrote: >>> Michael Kerrisk (man-pages) wrote: >> >>> (3) There's no problem with asking for extra bits, even if the

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Andreas Dilger
On Apr 21, 2017, at 7:13 AM, Michael Kerrisk (man-pages) wrote: > > On 04/21/2017 03:01 PM, David Howells wrote: >> Michael Kerrisk (man-pages) wrote: > >> (3) There's no problem with asking for extra bits, even if the running >> kerneldoes

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Andreas Dilger
On Apr 21, 2017, at 7:13 AM, Michael Kerrisk (man-pages) wrote: > > On 04/21/2017 03:01 PM, David Howells wrote: >> Michael Kerrisk (man-pages) wrote: > >> (3) There's no problem with asking for extra bits, even if the running >> kerneldoes not support them, because the kernel tells you

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
On 04/21/2017 03:01 PM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > (3) There's no problem with asking for extra bits, even if the running kernel > does not support them, because the kernel tells you in its response what > fields it actually

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
On 04/21/2017 03:01 PM, David Howells wrote: > Michael Kerrisk (man-pages) wrote: > (3) There's no problem with asking for extra bits, even if the running kernel > does not support them, because the kernel tells you in its response what > fields it actually gave you. It's this

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread David Howells
Michael Kerrisk (man-pages) wrote: > I was reading your statx(2) man page, and noticed this text: > >Do not simply set mask to UINT_MAX as one or more bits may, in the >future, be used to specify an extension to the buffer. > > (Here' 'mask' is the

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread David Howells
Michael Kerrisk (man-pages) wrote: > I was reading your statx(2) man page, and noticed this text: > >Do not simply set mask to UINT_MAX as one or more bits may, in the >future, be used to specify an extension to the buffer. > > (Here' 'mask' is the fourth argument to statx())

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread David Howells
David Howells wrote: > > Similarly, there appears to be no check for invalid flags in the > > 'flags' argument of statx(). Why is there also not such a check > > there? > > Like this? > > if (mask & STATX__RESERVED) > return -EINVAL; Sorry, I misread.

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread David Howells
David Howells wrote: > > Similarly, there appears to be no check for invalid flags in the > > 'flags' argument of statx(). Why is there also not such a check > > there? > > Like this? > > if (mask & STATX__RESERVED) > return -EINVAL; Sorry, I misread. You referred to

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread David Howells
Michael Kerrisk (man-pages) wrote: > I was reading your statx(2) man page, and noticed this text: > >Do not simply set mask to UINT_MAX as one or more bits may, in the >future, be used to specify an extension to the buffer. > > (Here' 'mask' is the

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread David Howells
Michael Kerrisk (man-pages) wrote: > I was reading your statx(2) man page, and noticed this text: > >Do not simply set mask to UINT_MAX as one or more bits may, in the >future, be used to specify an extension to the buffer. > > (Here' 'mask' is the fourth argument to statx())

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
[Adding a few people to CC, and correcting myself on one piece] On 04/21/2017 02:14 PM, Michael Kerrisk (man-pages) wrote: > Hello David, > > I was reading your statx(2) man page, and noticed this text: > >Do not simply set mask to UINT_MAX as one or more bits may, in the >

Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
[Adding a few people to CC, and correcting myself on one piece] On 04/21/2017 02:14 PM, Michael Kerrisk (man-pages) wrote: > Hello David, > > I was reading your statx(2) man page, and noticed this text: > >Do not simply set mask to UINT_MAX as one or more bits may, in the >

Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
Hello David, I was reading your statx(2) man page, and noticed this text: Do not simply set mask to UINT_MAX as one or more bits may, in the future, be used to specify an extension to the buffer. (Here' 'mask' is the fourth argument to statx()) What is going on here? Why is

Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

2017-04-21 Thread Michael Kerrisk (man-pages)
Hello David, I was reading your statx(2) man page, and noticed this text: Do not simply set mask to UINT_MAX as one or more bits may, in the future, be used to specify an extension to the buffer. (Here' 'mask' is the fourth argument to statx()) What is going on here? Why is