Re: [PATCH] statx: reject unknown flags when using NULL path

From
Christoph Hellwig <hch@infradead.org>
Date
2017-03-20 17:44:29
Also in
linux-fsdevel, linux-xfs
Reply to
Eric Biggers, 2017-03-20
On Mon, Mar 20, 2017 at 10:11:42AM -0700, Eric Biggers wrote:
On Fri, Mar 10, 2017 at 10:58:23PM -0800, Eric Biggers wrote:
quoted
From: Eric Biggers <redacted>

The statx() system call currently accepts unknown flags when called with
a NULL path to operate on a file descriptor.  Left unchanged, this could
make it hard to introduce new query flags in the future, since
applications may not be able to tell whether a given flag is supported.

Fix this by failing the system call with EINVAL if any flags other than
KSTAT_QUERY_FLAGS are specified in combination with a NULL path.
Does anyone have comments on this patch?
Looks good to me.
I really think we need to get this in before v4.11 is released, since it deals
with the API.
Yes.  And we really need test for all of this.  Or just revert the
patches.  Shipping with untested syscalls is just a desaster.
Thread (8 messages) 8 messages, 4 authors, last reply 2017-03-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help