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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dd5d64fe-96a7-a588-52af-d75928c2a48b@samba.org>
Date:   Mon, 20 Apr 2020 11:03:57 +0200
From:   Stefan Metzmacher <metze@...ba.org>
To:     Miklos Szeredi <mszeredi@...hat.com>
Cc:     Al Viro <viro@...iv.linux.org.uk>,
        lkml <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux API <linux-api@...r.kernel.org>,
        Eric Sandeen <sandeen@...deen.net>
Subject: Re: [PATCH] vfs: add faccessat2 syscall

Am 20.04.20 um 10:58 schrieb Miklos Szeredi:
> On Sat, Apr 18, 2020 at 10:23 PM Stefan Metzmacher <metze@...ba.org> wrote:
>>
>> Am 18.04.20 um 21:00 schrieb Miklos Szeredi:
>>> On Sat, Apr 18, 2020 at 8:36 PM Stefan Metzmacher <metze@...ba.org> wrote:
>>>>
>>>> Hi Miklos,
>>>>
>>>>> 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.
>>>
>>> What is the objection against
>>>
>>> openat(... O_PATH)
>>> foobarat(fd, AT_EMPTY_PATH, ...)
>>
>> openat2(), foobarat(), close() are 3 syscalls vs. just one.
> 
> That's not a good argument.  We could have a million specialized
> syscalls that all do very useful things.  Except it would be a
> nightmare in terms of maintenance...
> 
> "do one thing and do it well"
> 
>> As we have the new features available, I think it would be
>> good to expose them to userspace for all new syscalls, so
>> that applications can avoid boiler plate stuff around each syscall
>> and get better performance in a world where context switches are not for
>> free.
> 
> The io-uring guys are working on that problem, AFAIK.

Ok, I'll try to workout with Jens, how to do optimizations...

metze




Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ