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: <64d9b7af-0b5f-4164-a97f-3b6f6792e84e@arm.com>
Date: Tue, 24 Sep 2024 16:14:46 +0100
From: Vincenzo Frascino <vincenzo.frascino@....com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
 linux-mm@...ck.org, Andy Lutomirski <luto@...nel.org>,
 Thomas Gleixner <tglx@...utronix.de>,
 Christophe Leroy <christophe.leroy@...roup.eu>,
 Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
 Naveen N Rao <naveen@...nel.org>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 "H . Peter Anvin" <hpa@...or.com>, Theodore Ts'o <tytso@....edu>,
 Arnd Bergmann <arnd@...db.de>, Andrew Morton <akpm@...ux-foundation.org>,
 Steven Rostedt <rostedt@...dmis.org>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH v2 7/8] vdso: Introduce uapi/vdso/random.h



On 24/09/2024 00:09, Jason A. Donenfeld wrote:
> On Mon, Sep 23, 2024 at 03:19:42PM +0100, Vincenzo Frascino wrote:
>> --- a/include/uapi/linux/random.h
>> +++ b/include/uapi/linux/random.h
>> @@ -44,30 +44,6 @@ struct rand_pool_info {
>>  	__u32	buf[];
>>  };
>>  
>> -/*
>> - * Flags for getrandom(2)
>> - *
>> - * GRND_NONBLOCK	Don't block and return EAGAIN instead
>> - * GRND_RANDOM		No effect
>> - * GRND_INSECURE	Return non-cryptographic random bytes
>> - */
>> -#define GRND_NONBLOCK	0x0001
>> -#define GRND_RANDOM	0x0002
>> -#define GRND_INSECURE	0x0004
>> -
>> -/**
>> - * struct vgetrandom_opaque_params - arguments for allocating memory for vgetrandom
>> - *
>> - * @size_per_opaque_state:	Size of each state that is to be passed to vgetrandom().
>> - * @mmap_prot:			Value of the prot argument in mmap(2).
>> - * @mmap_flags:			Value of the flags argument in mmap(2).
>> - * @reserved:			Reserved for future use.
>> - */
>> -struct vgetrandom_opaque_params {
>> -	__u32 size_of_opaque_state;
>> -	__u32 mmap_prot;
>> -	__u32 mmap_flags;
>> -	__u32 reserved[13];
>> -};
>> +#include <vdso/random.h>
>>  
>>  #endif /* _UAPI_LINUX_RANDOM_H */
>> diff --git a/include/uapi/vdso/random.h b/include/uapi/vdso/random.h
>> new file mode 100644
>> index 000000000000..5c80995129c2
>> --- /dev/null
>> +++ b/include/uapi/vdso/random.h
>> @@ -0,0 +1,38 @@
>> +
> 
> I really do not like this. This is UAPI, and it's linux/something.h
> style of UAPI. What does moving it to vdso/ accomplish except confusion
> for people looking where the code is and then polluting users'
> /usr/include with extra directories that aren't meaningful?
> 
> A change like this makes me think the approach taken by this patchset
> might not be the right one.

The rationale was explained in my comment on patch 1/8. If you do not like the
vdso/ namespace in uapi/ could you please let me know what is your preference is
isolating the parts needed by the vdso library?

-- 
Regards,
Vincenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ