diff options
author | Xi Ruoyao <xry111@xry111.site> | 2025-06-20 00:25:32 +0800 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-23 11:48:15 -0300 |
commit | fc6f074e0496fb8a8df491641165f4ed3cdaa3a3 (patch) | |
tree | 71f3767795ed8a53c1032c0e669081db178a3ee9 | |
parent | 47b577c66f2f51305d1802195f868d6b43e6d84a (diff) | |
download | glibc-fc6f074e0496fb8a8df491641165f4ed3cdaa3a3.zip glibc-fc6f074e0496fb8a8df491641165f4ed3cdaa3a3.tar.gz glibc-fc6f074e0496fb8a8df491641165f4ed3cdaa3a3.tar.bz2 |
riscv: linux: Add support for getrandom vDSO
Linux kernel >= 6.16 has getrandom() in vDSO for RISC-V. Enable the use
of it in Glibc so it would benefit the programs using the Glibc high
quality random number functions.
Link: https://git.kernel.org/torvalds/c/ee0d03053e70
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r-- | sysdeps/unix/sysv/linux/riscv/sysdep.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index ee015df..05e0e05 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -145,11 +145,12 @@ # define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" # define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" # define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" +# define HAVE_GETRANDOM_VSYSCALL "__vdso_getrandom" # else # define VDSO_NAME "LINUX_5.4" # define VDSO_HASH 61765876 -/* RV32 does not support the gettime VDSO syscalls. */ +/* RV32 does not support the gettime and getrandom VDSO syscalls. */ # endif # define HAVE_CLONE3_WRAPPER 1 |