[PATCH v4] linux: Add support for getrandom vDSO

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Sep 4 13:44:06 GMT 2024



On 03/09/24 14:31, Xi Ruoyao wrote:
> On Mon, 2024-09-02 at 14:38 -0300, Adhemerval Zanella wrote:
>> Checked on x86_64-linux-gnu.
> 
> /* snip */
> 
>> The loongarch support is already on random tree, while aarch64 and
>> powerpc support is under review.
> 
> I've checked this on LoongArch with
> 
> diff --git a/sysdeps/unix/sysv/linux/loongarch/sysdep.h b/sysdeps/unix/sysv/linux/loongarch/sysdep.h
> index eb0ba790da..e2d853ae3e 100644
> --- a/sysdeps/unix/sysv/linux/loongarch/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/loongarch/sysdep.h
> @@ -119,6 +119,7 @@
>  #define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
>  #define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
>  #define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
> +#define HAVE_GETRANDOM_VSYSCALL "__vdso_getrandom"
>  
>  #define HAVE_CLONE3_WRAPPER 1
> 
> The Glibc test suite passes.  A GDB debug session shows the vDSO
> implementation is indeed used for getrandom() as well.
> 

Thanks for checking this out, I have also tested on aarch64 with my
bgetrandom patches (although not yet on random tree).  I think once
the vgetrandom are on Linus tree we can also enable it for loongarch.


More information about the Libc-alpha mailing list