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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pmd7wih8.ffs@tglx>
Date:   Mon, 28 Nov 2022 10:12:19 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
        linux-crypto@...r.kernel.org, linux-api@...r.kernel.org,
        x86@...nel.org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Adhemerval Zanella Netto <adhemerval.zanella@...aro.org>,
        Carlos O'Donell <carlos@...hat.com>,
        Florian Weimer <fweimer@...hat.com>,
        Arnd Bergmann <arnd@...db.de>,
        Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v7 1/3] random: add vgetrandom_alloc() syscall

On Sun, Nov 27 2022 at 21:18, Jason A. Donenfeld wrote:
> On Fri, Nov 25, 2022 at 09:45:31PM +0100, Thomas Gleixner wrote:
>> > --- a/arch/x86/include/asm/unistd.h
>> > +++ b/arch/x86/include/asm/unistd.h
>> > @@ -27,6 +27,7 @@
>> >  #  define __ARCH_WANT_COMPAT_SYS_PWRITEV64
>> >  #  define __ARCH_WANT_COMPAT_SYS_PREADV64V2
>> >  #  define __ARCH_WANT_COMPAT_SYS_PWRITEV64V2
>> > +#  define __ARCH_WANT_VGETRANDOM_ALLOC
>> 
>> So instead of this define, why can't you do:
>> 
>> config VGETRADOM_ALLOC
>>        bool
>>        select ADVISE_SYSCALLS
>> 
>> and then have
>> 
>> config GENERIC_VDSO_RANDOM_WHATEVER
>>        bool
>>        select VGETRANDOM_ALLOC
>> 
>> This gives a clear Kconfig dependency instead of the random
>> ADVISE_SYSCALLS select.
>
> That's much better indeed. I was trying to straddle the two conventions
> of `#define __ARCH_...` for syscalls and a Kconfig for vDSO functions,
> but doing it all together as you've suggested is nicer.
>
> I'll try to figure this out, though so far futzing around suggests there
> might have to be both, because of unistd.h being a userspace header.
> That is, include/uapi/asm-generic/unistd.h typically needs a `#if
> __ARCH_WANT..., #define ...` in it. I'll give it a spin and you'll see

Bah. Did not think about that user space part...

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ