From: Christian Brauner <christian.brauner@ubuntu.com>
To: Aleksa Sarai <cyphar@cyphar.com>
Cc: David Howells <dhowells@redhat.com>,
linux-api@vger.kernel.org, viro@zeniv.linux.org.uk,
torvalds@linux-foundation.org, metze@samba.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] Mark AT_* path flags as deprecated and add missing RESOLVE_ flags
Date: Fri, 6 Mar 2020 15:10:29 +0100 [thread overview]
Message-ID: <20200306141029.zon3nt7oxqywbzf6@wittgenstein> (raw)
In-Reply-To: <20200306134116.qfa2gj6os4weru7o@yavin>
On Sat, Mar 07, 2020 at 12:41:16AM +1100, Aleksa Sarai wrote:
> On 2020-03-05, David Howells <dhowells@redhat.com> wrote:
> > Do we want to do this? Or should we duplicate the RESOLVE_* flags to AT_*
> > flags so that existing *at() syscalls can make use of them?
> >
> > David
> > ---
> > commit 448731bf3b29f2b1f7c969d7efe1f0673ae13b5e
> > Author: David Howells <dhowells@redhat.com>
> > Date: Thu Mar 5 17:40:02 2020 +0000
> >
> > Mark AT_* flags as deprecated and add missing RESOLVE_ flags
> >
> > It has been suggested that new path-using system calls should use RESOLVE_*
> > flags instead of AT_* flags, but the RESOLVE_* flag functions are not a
> > superset of the AT_* flag functions. So formalise this by:
> >
> > (1) In linux/fcntl.h, add a comment noting that the AT_* flags are
> > deprecated for new system calls and that RESOLVE_* flags should be
> > used instead.
>
> I wouldn't say it that way -- the RESOLVE_* flags should be used by
> syscalls *where it makes sense to change the path resolution rules*. If
> it makes more sense for them to have their own flag set, they should
> arguably make a separate one (like renameat2 did -- though renameat2 can
> never take AT_EMPTY_PATH because it isn't sufficiently extensible).
Yeah, we should clearly state that they are not a replacement for
_all_ the AT_* flags. I think it makes sense to think of RESOLVE_* flags
as a superset of the path-resolution portions of AT_* flags.
Maybe in openat2.h:
/*
* Flags available to syscalls wanting to modify how paths are resolved.
* RESOLVE_* flags are intended to as a superset of those AT_* flags
* concerned with path resolution. All syscalls modifying their path
* resolution behavior are expected to use RESOLVE_* flags.
*/
Something like this (Native speaker can probably do this way nicer.)?
prev parent reply other threads:[~2020-03-06 14:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 17:43 [RFC][PATCH] Mark AT_* path flags as deprecated and add missing RESOLVE_ flags David Howells
2020-03-05 20:11 ` Stefan Metzmacher
2020-03-05 20:35 ` David Howells
[not found] ` <20200306134407.zjiiieg3m6ce5uts@yavin>
2020-03-06 14:56 ` David Howells
2020-03-06 13:56 ` Christian Brauner
2020-03-06 14:43 ` David Howells
[not found] ` <20200306134116.qfa2gj6os4weru7o@yavin>
2020-03-06 14:10 ` Christian Brauner [this message]
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=20200306141029.zon3nt7oxqywbzf6@wittgenstein \
--to=christian.brauner@ubuntu.com \
--cc=cyphar@cyphar.com \
--cc=dhowells@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=torvalds@linux-foundation.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