From: Matt Helsley <matthltc@us.ibm.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Matt Helsley <matthltc@us.ibm.com>, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 0/4] Check O_* flags set with fcntl() on anon_inode files.
Date: Mon, 15 Feb 2010 09:26:35 -0800 [thread overview]
Message-ID: <20100215172635.GI3714@count0.beaverton.ibm.com> (raw)
In-Reply-To: <20100214035205.GU30031@ZenIV.linux.org.uk>
On Sun, Feb 14, 2010 at 03:52:05AM +0000, Al Viro wrote:
> On Sat, Feb 13, 2010 at 04:27:43PM -0800, Matt Helsley wrote:
> > anon_inode interfaces often do not support flags that can be set
> > by fcntl(). Right now using fcntl() to set these flags falsely
> > reports success for things like O_ASYNC yet SIGIO is not delivered.
> >
> > I relied on the flags allowed by the syscalls that create
> > these files to determine the flags that are allowed to be set by
> > fcntl().
> >
> > Each patch checks flags for one anonymous inode interface:
> >
> > [PATCH 1/4] signalfd
> > [PATCH 2/4] timerfd
> > [PATCH 3/4] epoll
> > [PATCH 4/4] eventfd
> >
> > I did not check the perf, kvm-vm, or kvm-vcpu uses of anon_inodes.
>
> Er... O_ASYNC is silently ignored for regular files as well, so any
> userland code that tries to rely on fcntl() rejecting it is and always
> had been badly b0rken.
Of course. Did you mean to imply that the kernel shouldn't bother to
reject these, or were you merely making an observation?
Cheers,
-Matt Helsley
next prev parent reply other threads:[~2010-02-15 17:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 0:27 Matt Helsley
2010-02-14 0:27 ` [RFC][PATCH 1/4] anon_inode fcntl() checks: report failure for fcntl(F_SETFL) on signalfd Matt Helsley
2010-02-14 0:27 ` [RFC][PATCH 2/4] anon_inode fcntl() checks: report failure for fcntl(F_SETFL) on timerfd Matt Helsley
2010-02-14 0:27 ` [RFC][PATCH 3/4] anon_inode fcntl() checks: report failure for fcntl(F_SETFL) on epoll Matt Helsley
2010-02-14 0:27 ` [RFC][PATCH 4/4] anon_inode fcntl() checks: report failure for fcntl(F_SETFL) on eventfd Matt Helsley
2010-02-14 0:40 ` [RFC][PATCH 0/4] Check O_* flags set with fcntl() on anon_inode files Davide Libenzi
2010-02-14 3:52 ` Al Viro
2010-02-15 17:26 ` Matt Helsley [this message]
2010-02-15 19:57 ` Al Viro
2010-02-16 11:37 ` Matt Helsley
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=20100215172635.GI3714@count0.beaverton.ibm.com \
--to=matthltc@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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
all inboxes | Powered by JetHome®