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@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260909-vdso-asm-generic-vsyscall-h-v1-3-63ae856cc659@linutronix.de
This commit is contained in:
Thomas Weißschuh 2026-09-09 10:51:16 +02:00 committed by Thomas Gleixner
parent 4fba7bb3e7
commit ca0da001d3
2 changed files with 7 additions and 7 deletions

View File

@ -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)
{

View File

@ -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); \