All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: David Drysdale <drysdale@google.com>
Cc: Michael Kerrisk-manpages <mtk.manpages@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Kees Cook <keescook@chromium.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Meredydd Luff <meredydd@senatehouse.org>,
	Will Drewry <wad@chromium.org>,
	Jorge Lucangeli Obes <jorgelo@google.com>,
	Ricky Zhou <rickyz@google.com>, Lee Campbell <leecam@google.com>,
	Julien Tinnes <jln@google.com>,
	Mike Depinet <mdepinet@google.com>,
	James Morris <james.l.morris@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Paul Moore <paul@paul-moore.com>,
	Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>,
	Linux API <linux-api@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	fstests <fstests@vger.kernel.org>
Subject: Re: [PATCHv4 man-pages 3/3] open.2: describe O_BENEATH flag
Date: Fri, 14 Aug 2015 07:17:50 -0700	[thread overview]
Message-ID: <CALCETrXLhp6-dVq8TS0_vSQBJieP-SrabhoDJE0PZ8KpMz1m0A@mail.gmail.com> (raw)
In-Reply-To: <CAHse=S9HdriyqKrQRj=x3CpEFftPgVFX7p8B9efu9_mQtEvJSA@mail.gmail.com>

On Fri, Aug 14, 2015 at 2:29 AM, David Drysdale <drysdale@google.com> wrote:
> On Fri, Aug 14, 2015 at 6:33 AM, Michael Kerrisk (man-pages)
> <mtk.manpages@gmail.com> wrote:
>> On 13 August 2015 at 19:38, Andy Lutomirski <luto@amacapital.net> wrote:
>>> On Thu, Aug 13, 2015 at 2:32 AM, David Drysdale <drysdale@google.com> wrote:
>>>> Signed-off-by: David Drysdale <drysdale@google.com>
>>>
>>> What's the behavior wrt fcntl(F_GETFL, etc)?
>>
>> I would presume that O_BENEATH is one of the so-called "file creation
>> flags". See this paragraph of the DESCRIPTION:
>>
>>        In addition, zero or more file creation  flags  and  file  status
>>        flags  can be bitwise-or'd in flags.  The file creation flags are
>>        O_CLOEXEC, O_CREAT, O_DIRECTORY,  O_EXCL,  O_NOCTTY,  O_NOFOLLOW,
>>        O_TMPFILE,  O_TRUNC,  and  O_TTY_INIT.  The file status flags are
>>        all of the remaining flags listed below.  The distinction between
>>        these  two  groups  of flags is that the file status flags can be
>>        retrieved and (in some cases) modified; see fcntl(2) for details.
>>
>> David, presuming this is correct (I can't see how O_BENEATH could be a
>> "file *status* flag"), your patch should also add O_BENEATH to the
>> list in that paragraph.
>
> Yeah, O_BENEATH makes sense as a file creation flag; I'll add it
> to that list -- thanks for spotting.

Should there be a test that you can't clear O_BENEATH with F_SETFL?

--Andy

WARNING: multiple messages have this Message-ID (diff)
From: Andy Lutomirski <luto@amacapital.net>
To: David Drysdale <drysdale@google.com>
Cc: Michael Kerrisk-manpages <mtk.manpages@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Kees Cook <keescook@chromium.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Meredydd Luff <meredydd@senatehouse.org>,
	Will Drewry <wad@chromium.org>,
	Jorge Lucangeli Obes <jorgelo@google.com>,
	Ricky Zhou <rickyz@google.com>, Lee Campbell <leecam@google.com>,
	Julien Tinnes <jln@google.com>,
	Mike Depinet <mdepinet@google.com>,
	James Morris <james.l.morris@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Paul Moore <paul@paul-moore.com>,
	Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>,
	Linux API <linux-api@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	Linux FS Devel <linux
Subject: Re: [PATCHv4 man-pages 3/3] open.2: describe O_BENEATH flag
Date: Fri, 14 Aug 2015 07:17:50 -0700	[thread overview]
Message-ID: <CALCETrXLhp6-dVq8TS0_vSQBJieP-SrabhoDJE0PZ8KpMz1m0A@mail.gmail.com> (raw)
In-Reply-To: <CAHse=S9HdriyqKrQRj=x3CpEFftPgVFX7p8B9efu9_mQtEvJSA@mail.gmail.com>

On Fri, Aug 14, 2015 at 2:29 AM, David Drysdale <drysdale@google.com> wrote:
> On Fri, Aug 14, 2015 at 6:33 AM, Michael Kerrisk (man-pages)
> <mtk.manpages@gmail.com> wrote:
>> On 13 August 2015 at 19:38, Andy Lutomirski <luto@amacapital.net> wrote:
>>> On Thu, Aug 13, 2015 at 2:32 AM, David Drysdale <drysdale@google.com> wrote:
>>>> Signed-off-by: David Drysdale <drysdale@google.com>
>>>
>>> What's the behavior wrt fcntl(F_GETFL, etc)?
>>
>> I would presume that O_BENEATH is one of the so-called "file creation
>> flags". See this paragraph of the DESCRIPTION:
>>
>>        In addition, zero or more file creation  flags  and  file  status
>>        flags  can be bitwise-or'd in flags.  The file creation flags are
>>        O_CLOEXEC, O_CREAT, O_DIRECTORY,  O_EXCL,  O_NOCTTY,  O_NOFOLLOW,
>>        O_TMPFILE,  O_TRUNC,  and  O_TTY_INIT.  The file status flags are
>>        all of the remaining flags listed below.  The distinction between
>>        these  two  groups  of flags is that the file status flags can be
>>        retrieved and (in some cases) modified; see fcntl(2) for details.
>>
>> David, presuming this is correct (I can't see how O_BENEATH could be a
>> "file *status* flag"), your patch should also add O_BENEATH to the
>> list in that paragraph.
>
> Yeah, O_BENEATH makes sense as a file creation flag; I'll add it
> to that list -- thanks for spotting.

Should there be a test that you can't clear O_BENEATH with F_SETFL?

--Andy

WARNING: multiple messages have this Message-ID (diff)
From: Andy Lutomirski <luto@amacapital.net>
To: David Drysdale <drysdale@google.com>
Cc: Michael Kerrisk-manpages <mtk.manpages@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Kees Cook <keescook@chromium.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Meredydd Luff <meredydd@senatehouse.org>,
	Will Drewry <wad@chromium.org>,
	Jorge Lucangeli Obes <jorgelo@google.com>,
	Ricky Zhou <rickyz@google.com>, Lee Campbell <leecam@google.com>,
	Julien Tinnes <jln@google.com>,
	Mike Depinet <mdepinet@google.com>,
	James Morris <james.l.morris@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Paul Moore <paul@paul-moore.com>,
	Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>,
	Linux API <linux-api@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>Linux FS Devel
	<linux>
Subject: Re: [PATCHv4 man-pages 3/3] open.2: describe O_BENEATH flag
Date: Fri, 14 Aug 2015 07:17:50 -0700	[thread overview]
Message-ID: <CALCETrXLhp6-dVq8TS0_vSQBJieP-SrabhoDJE0PZ8KpMz1m0A@mail.gmail.com> (raw)
In-Reply-To: <CAHse=S9HdriyqKrQRj=x3CpEFftPgVFX7p8B9efu9_mQtEvJSA@mail.gmail.com>

On Fri, Aug 14, 2015 at 2:29 AM, David Drysdale <drysdale@google.com> wrote:
> On Fri, Aug 14, 2015 at 6:33 AM, Michael Kerrisk (man-pages)
> <mtk.manpages@gmail.com> wrote:
>> On 13 August 2015 at 19:38, Andy Lutomirski <luto@amacapital.net> wrote:
>>> On Thu, Aug 13, 2015 at 2:32 AM, David Drysdale <drysdale@google.com> wrote:
>>>> Signed-off-by: David Drysdale <drysdale@google.com>
>>>
>>> What's the behavior wrt fcntl(F_GETFL, etc)?
>>
>> I would presume that O_BENEATH is one of the so-called "file creation
>> flags". See this paragraph of the DESCRIPTION:
>>
>>        In addition, zero or more file creation  flags  and  file  status
>>        flags  can be bitwise-or'd in flags.  The file creation flags are
>>        O_CLOEXEC, O_CREAT, O_DIRECTORY,  O_EXCL,  O_NOCTTY,  O_NOFOLLOW,
>>        O_TMPFILE,  O_TRUNC,  and  O_TTY_INIT.  The file status flags are
>>        all of the remaining flags listed below.  The distinction between
>>        these  two  groups  of flags is that the file status flags can be
>>        retrieved and (in some cases) modified; see fcntl(2) for details.
>>
>> David, presuming this is correct (I can't see how O_BENEATH could be a
>> "file *status* flag"), your patch should also add O_BENEATH to the
>> list in that paragraph.
>
> Yeah, O_BENEATH makes sense as a file creation flag; I'll add it
> to that list -- thanks for spotting.

Should there be a test that you can't clear O_BENEATH with F_SETFL?

--Andy

  reply	other threads:[~2015-08-14 14:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13  9:32 [PATCHv4 0/3] fs: add O_BENEATH flag to openat(2) David Drysdale
2015-08-13  9:32 ` David Drysdale
2015-08-13  9:32 ` [PATCHv4 1/3] " David Drysdale
2015-08-13  9:32   ` David Drysdale
2015-08-13  9:32 ` [PATCHv4 2/3] selftests: Add test of O_BENEATH & openat(2) David Drysdale
2015-08-13  9:32 ` [PATCHv4 man-pages 3/3] open.2: describe O_BENEATH flag David Drysdale
2015-08-13 17:38   ` Andy Lutomirski
2015-08-13 17:38     ` Andy Lutomirski
2015-08-13 17:38     ` Andy Lutomirski
2015-08-14  5:33     ` Michael Kerrisk (man-pages)
2015-08-14  5:33       ` Michael Kerrisk (man-pages)
2015-08-14  5:33       ` Michael Kerrisk (man-pages)
2015-08-14  9:29       ` David Drysdale
2015-08-14  9:29         ` David Drysdale
2015-08-14  9:29         ` David Drysdale
2015-08-14 14:17         ` Andy Lutomirski [this message]
2015-08-14 14:17           ` Andy Lutomirski
2015-08-14 14:17           ` Andy Lutomirski
2015-08-14 15:30           ` David Drysdale
2015-08-14 15:30             ` David Drysdale
2015-08-14 15:30             ` David Drysdale

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=CALCETrXLhp6-dVq8TS0_vSQBJieP-SrabhoDJE0PZ8KpMz1m0A@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=david@fromorbit.com \
    --cc=drysdale@google.com \
    --cc=ebiederm@xmission.com \
    --cc=fstests@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=james.l.morris@oracle.com \
    --cc=jln@google.com \
    --cc=jorgelo@google.com \
    --cc=keescook@chromium.org \
    --cc=leecam@google.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mdepinet@google.com \
    --cc=meredydd@senatehouse.org \
    --cc=mtk.manpages@gmail.com \
    --cc=paul@paul-moore.com \
    --cc=pbonzini@redhat.com \
    --cc=rickyz@google.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wad@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.