[tip: timers/vdso] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c
From: tip-bot2 for Thomas Weißschuh
Date: Thu Oct 15 2026 - 12:18:02 EST
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: ca0da001d3cfe536ec2cacccd36ce70364cff8c8
Gitweb: https://git.kernel.org/tip/ca0da001d3cfe536ec2cacccd36ce70364cff8c8
Author: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Wed, 09 Sep 2026 10:51:16 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Thu, 15 Oct 2026 17:33:19 +02:00
vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c
__arch_get_vdso_u_rng_data() is only used in getrandom.c. vsyscall.h
has become a dumping ground for different kinds of fallbacks.
Move the fallback function definition into getrandom.c,
similar to other fallbacks.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20260909-vdso-asm-generic-vsyscall-h-v1-3-63ae856cc659@xxxxxxxxxxxxx
---
include/asm-generic/vdso/vsyscall.h | 7 -------
lib/vdso/getrandom.c | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
index fe12fb1..cdf7b39 100644
--- a/include/asm-generic/vdso/vsyscall.h
+++ b/include/asm-generic/vdso/vsyscall.h
@@ -4,13 +4,6 @@
#ifndef __ASSEMBLER__
-#ifndef __arch_get_vdso_u_rng_data
-static __always_inline const struct vdso_rng_data *__arch_get_vdso_u_rng_data(void)
-{
- return &vdso_u_rng_data;
-}
-#endif
-
#ifndef __arch_update_vdso_clock
static __always_inline void __arch_update_vdso_clock(struct vdso_clock *vc)
{
diff --git a/lib/vdso/getrandom.c b/lib/vdso/getrandom.c
index 2851afa..6ff4654 100644
--- a/lib/vdso/getrandom.c
+++ b/lib/vdso/getrandom.c
@@ -19,6 +19,13 @@
/* Bring in default accessors */
#include <vdso/vsyscall.h>
+#ifndef __arch_get_vdso_u_rng_data
+static __always_inline const struct vdso_rng_data *__arch_get_vdso_u_rng_data(void)
+{
+ return &vdso_u_rng_data;
+}
+#endif
+
#define MEMCPY_AND_ZERO_SRC(type, dst, src, len) do { \
while (len >= sizeof(type)) { \
__put_unaligned_t(type, __get_unaligned_t(type, src), dst); \