From: David Howells <dhowells@redhat.com>
To: unlisted-recipients:; (no To-header on input)
Cc: dhowells@redhat.com,
"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
hch@infradead.org
Subject: Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]
Date: Fri, 21 Apr 2017 13:47:20 +0100 [thread overview]
Message-ID: <18482.1492778840@warthog.procyon.org.uk> (raw)
In-Reply-To: <18425.1492778504@warthog.procyon.org.uk>
David Howells <dhowells@redhat.com> 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 flags, not mask. There's this in
sys_statx:
if ((flags & AT_STATX_SYNC_TYPE) == AT_STATX_SYNC_TYPE)
return -EINVAL;
this in vfs_statx:
if ((flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
AT_EMPTY_PATH | KSTAT_QUERY_FLAGS)) != 0)
return -EINVAL;
and this in vfs_statx_fd:
if (query_flags & ~KSTAT_QUERY_FLAGS)
return -EINVAL;
I don't necessarily agree with that last one, but other people think it should
be there.
David
next prev parent reply other threads:[~2017-04-21 12:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 12:14 Michael Kerrisk (man-pages)
2017-04-21 12:28 ` Michael Kerrisk (man-pages)
2017-04-21 12:41 ` David Howells
2017-04-21 12:47 ` David Howells [this message]
2017-04-21 13:01 ` David Howells
2017-04-21 13:13 ` Michael Kerrisk (man-pages)
2017-04-21 18:16 ` Andreas Dilger
2017-04-21 19:19 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18482.1492778840@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome