Re: [PATCH v2 7/8] vdso: Introduce uapi/vdso/random.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux