[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200419095651.djee6mgneyf3qi3v@yavin.dot.cyphar.com>
Date: Sun, 19 Apr 2020 19:56:51 +1000
From: Aleksa Sarai <cyphar@...har.com>
To: Stefan Metzmacher <metze@...ba.org>
Cc: Miklos Szeredi <mszeredi@...hat.com>,
Al Viro <viro@...IV.linux.org.uk>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-api@...r.kernel.org, Eric Sandeen <sandeen@...deen.net>
Subject: Re: [PATCH] vfs: add faccessat2 syscall
On 2020-04-18, Stefan Metzmacher <metze@...ba.org> wrote:
> > POSIX defines faccessat() as having a fourth "flags" argument, while the
> > linux syscall doesn't have it. Glibc tries to emulate AT_EACCESS and
> > AT_SYMLINK_NOFOLLOW, but AT_EACCESS emulation is broken.
> >
> > Add a new faccessat(2) syscall with the added flags argument and implement
> > both flags.
> >
> > The value of AT_EACCESS is defined in glibc headers to be the same as
> > AT_REMOVEDIR. Use this value for the kernel interface as well, together
> > with the explanatory comment.
>
> It would be nice if resolv_flags would also be passed in addition to the
> at flags.
> See:https://lore.kernel.org/linux-api/CAHk-=wiaL6zznNtCHKg6+MJuCqDxO=yVfms3qR9A0czjKuSSiA@mail.gmail.com/
>
> We should avoid expecting yet another syscall in near future.
If faccessat2() supported AT_EMPTY_PATH (which I'd be in favour of),
there's no need to add resolve flags because you could open the file as
O_PATH with whatever resolve flags you want, and then check it with
faccessat2().
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists