[lkml]   [2017]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectUnchecked flags in statx(2) [Should be fixed before 4.11-final?]
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 there not a check in the code to
give EINVAL if any flag other than those in STATX_ALL (0x00000fffU)
is specified? (There is a check that gives EINVAL flags in

Similarly, there appears to be no check for invalid flags in the
'flags' argument of statx(). Why is there also not such a check

The failure to do these sorts of checks has been the source of grief
in the past with other system calls.



Michael Kerrisk
Linux man-pages maintainer;
Linux/UNIX System Programming Training:

 \ /
  Last update: 2017-04-21 14:15    [W:0.081 / U:0.456 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site