lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200306141029.zon3nt7oxqywbzf6@wittgenstein>
Date:   Fri, 6 Mar 2020 15:10:29 +0100
From:   Christian Brauner <christian.brauner@...ntu.com>
To:     Aleksa Sarai <cyphar@...har.com>
Cc:     David Howells <dhowells@...hat.com>, linux-api@...r.kernel.org,
        viro@...iv.linux.org.uk, torvalds@...ux-foundation.org,
        metze@...ba.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] Mark AT_* path flags as deprecated and add missing
 RESOLVE_ flags

On Sat, Mar 07, 2020 at 12:41:16AM +1100, Aleksa Sarai wrote:
> On 2020-03-05, David Howells <dhowells@...hat.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@...hat.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.)?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ