[PATCH 8/9] s390/vdso: Directly include the generic vDSO implementations
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Dec 3 23:30:35 PST 2026
The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.
Directly include the .c files instead.
gettimeofday.c already used this pattern.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
arch/s390/kernel/vdso/Makefile | 4 ----
arch/s390/kernel/vdso/vgetrandom.c | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/s390/kernel/vdso/Makefile b/arch/s390/kernel/vdso/Makefile
index 54bcf2984ca1..8c43fde99151 100644
--- a/arch/s390/kernel/vdso/Makefile
+++ b/arch/s390/kernel/vdso/Makefile
@@ -10,10 +10,6 @@ CFLAGS_REMOVE_getcpu.o = $(VDSO_CFLAGS_REMOVE)
CFLAGS_REMOVE_vgetrandom.o = $(VDSO_CFLAGS_REMOVE)
CFLAGS_REMOVE_vdso_generic.o = $(VDSO_CFLAGS_REMOVE)
-ifneq ($(c-getrandom-y),)
- CFLAGS_vgetrandom.o += -include $(c-getrandom-y)
-endif
-
# Build rules
targets := $(obj-vdso) $(obj-cvdso) vdso.so vdso.so.dbg
diff --git a/arch/s390/kernel/vdso/vgetrandom.c b/arch/s390/kernel/vdso/vgetrandom.c
index b5268b507fb5..dd7e0fd50d44 100644
--- a/arch/s390/kernel/vdso/vgetrandom.c
+++ b/arch/s390/kernel/vdso/vgetrandom.c
@@ -4,6 +4,8 @@
#include <uapi/asm-generic/errno.h>
#include "vdso.h"
+#include "../../../../lib/vdso/getrandom.c"
+
ssize_t __kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
{
if (test_facility(129))
--
2.56.1
More information about the linux-arm-kernel
mailing list