[PATCH v4] linux: Add support for getrandom vDSO
Xi Ruoyao
xry111@xry111.site
Tue Sep 3 17:31:00 GMT 2024
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.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
More information about the Libc-alpha
mailing list