Linux Overlay Filesystem development
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: linux-fsdevel@vger.kernel.org, amir73il@gmail.com,
	zohar@linux.ibm.com,
	syzbot+ae82084b07d0297e566b@syzkaller.appspotmail.com,
	syzkaller-bugs@googlegroups.com, linux-integrity@vger.kernel.org,
	linux-unionfs@vger.kernel.org, dvyukov@google.com
Subject: Re: [PATCH] fs: Evaluate O_WRONLY | O_RDWR to O_RDWR
Date: Thu, 13 Dec 2018 12:10:01 +0000	[thread overview]
Message-ID: <20181213121000.GM2217@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20181213115717.p7ncktng2ihxw5md@merlin>

On Thu, Dec 13, 2018 at 05:57:17AM -0600, Goldwyn Rodrigues wrote:
> A user can open(O_WRONLY | O_RDWR) and the options are valid.
> However, OPEN_FMODE() evaluates both FMODE_READ and FMODE_WRITE,
> as negative. We also need to protect the lower layers from this
> anomaly.
> 
> Solve it by dropping O_WRONLY, so O_RDWR takes precedence.

Congratulations, you've broken fdutils...  Passing 3 in lower bits
of open() flags is *not* the same as O_RDWR; behaiviour is
different and deliberately chosen by existing userland code.

IOW, NAK.

  reply	other threads:[~2018-12-13 12:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 11:57 [PATCH] fs: Evaluate O_WRONLY | O_RDWR to O_RDWR Goldwyn Rodrigues
2018-12-13 12:10 ` Al Viro [this message]
2018-12-13 12:16   ` Amir Goldstein
2018-12-13 12:16   ` Dmitry Vyukov
2018-12-13 12:34     ` Al Viro
2018-12-13 14:05       ` Goldwyn Rodrigues

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=20181213121000.GM2217@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=amir73il@gmail.com \
    --cc=dvyukov@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=rgoldwyn@suse.de \
    --cc=syzbot+ae82084b07d0297e566b@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=zohar@linux.ibm.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