Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/9] vdso: Directly include the generic vDSO implementations
@ 2026-12-04  7:30 Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 1/9] csky/vdso: Remove all gettimeofday() remnants Thomas Weißschuh
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead, like it is done on x86 already.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (9):
      csky/vdso: Remove all gettimeofday() remnants
      arm64/vdso: Directly include the generic vDSO implementations
      ARM: vdso:  Directly include the generic vDSO implementations
      LoongArch: vDSO: Directly include the generic vDSO implementations
      powerpc/vdso: Directly include the generic vDSO implementations
      MIPS: VDSO: Directly include the generic vDSO implementations
      riscv: vdso: Directly include the generic vDSO implementations
      s390/vdso: Directly include the generic vDSO implementations
      vdso: Drop the old inclusion machinery

 arch/arm/vdso/Makefile                   |  4 ----
 arch/arm/vdso/vgettimeofday.c            |  2 ++
 arch/arm64/kernel/vdso/Makefile          |  8 --------
 arch/arm64/kernel/vdso/vgetrandom.c      |  2 ++
 arch/arm64/kernel/vdso/vgettimeofday.c   |  2 ++
 arch/arm64/kernel/vdso32/Makefile        |  4 ----
 arch/arm64/kernel/vdso32/vgettimeofday.c |  2 ++
 arch/csky/kernel/vdso/Makefile           |  9 +--------
 arch/loongarch/vdso/Makefile             |  8 --------
 arch/loongarch/vdso/vgetrandom.c         |  2 ++
 arch/loongarch/vdso/vgettimeofday.c      |  2 ++
 arch/mips/vdso/Makefile                  | 10 +++-------
 arch/mips/vdso/vgettimeofday.c           |  2 ++
 arch/powerpc/kernel/vdso/Makefile        | 10 +---------
 arch/powerpc/kernel/vdso/vgetrandom.c    |  2 ++
 arch/powerpc/kernel/vdso/vgettimeofday.c |  2 ++
 arch/riscv/kernel/vdso/Makefile          | 10 ++--------
 arch/riscv/kernel/vdso/getrandom.c       |  2 ++
 arch/riscv/kernel/vdso/vgettimeofday.c   |  2 ++
 arch/s390/kernel/vdso/Makefile           |  4 ----
 arch/s390/kernel/vdso/vgetrandom.c       |  2 ++
 lib/vdso/Makefile.include                |  6 ------
 22 files changed, 31 insertions(+), 66 deletions(-)
---
base-commit: c18138e0f879f98b30de2e6e1ffa916d28630c0a
change-id: 20261202-vdso-generic-include-6330a2b3ee12

Best regards,
--  
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/9] csky/vdso: Remove all gettimeofday() remnants
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 2/9] arm64/vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The CSKY vDSO does not support gettimeofday() anymore.

Remove the remaining, dead build integrations.

Fixes: cf12469600fe ("csky/vdso: Remove gettimeofday() and friends from VDSO")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/csky/kernel/vdso/Makefile | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/arch/csky/kernel/vdso/Makefile b/arch/csky/kernel/vdso/Makefile
index a3042287a070..77c70851318a 100644
--- a/arch/csky/kernel/vdso/Makefile
+++ b/arch/csky/kernel/vdso/Makefile
@@ -1,19 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-# Include the generic Makefile to check the built vdso.
-include $(srctree)/lib/vdso/Makefile.include
-
 # Symbols present in the vdso
 vdso-syms  += rt_sigreturn
 
 # Files to link into the vdso
 obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
 
-ifneq ($(c-gettimeofday-y),)
-	CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
-endif
-
-ccflags-y := -fno-stack-protector -DBUILD_VDSO32
+ccflags-y := -fno-stack-protector
 
 # Build rules
 targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds vdso-dummy.o

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/9] arm64/vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 1/9] csky/vdso: Remove all gettimeofday() remnants Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:38   ` sashiko-bot
  2026-12-04  7:30 ` [PATCH 3/9] ARM: vdso: " Thomas Weißschuh
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/arm64/kernel/vdso/Makefile          | 8 --------
 arch/arm64/kernel/vdso/vgetrandom.c      | 2 ++
 arch/arm64/kernel/vdso/vgettimeofday.c   | 2 ++
 arch/arm64/kernel/vdso32/Makefile        | 4 ----
 arch/arm64/kernel/vdso32/vgettimeofday.c | 2 ++
 5 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index f6619e1cb2ce..b119f08a14da 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -49,14 +49,6 @@ CFLAGS_REMOVE_vgetrandom.o = $(CC_FLAGS_REMOVE_VDSO)
 CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
 CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
 
-ifneq ($(c-gettimeofday-y),)
-  CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
-endif
-
-ifneq ($(c-getrandom-y),)
-  CFLAGS_vgetrandom.o += -include $(c-getrandom-y)
-endif
-
 targets += vdso.lds
 CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
 
diff --git a/arch/arm64/kernel/vdso/vgetrandom.c b/arch/arm64/kernel/vdso/vgetrandom.c
index 832fe195292b..e77f45e1fa1d 100644
--- a/arch/arm64/kernel/vdso/vgetrandom.c
+++ b/arch/arm64/kernel/vdso/vgetrandom.c
@@ -2,6 +2,8 @@
 
 #include <uapi/asm-generic/errno.h>
 
+#include "../../../../lib/vdso/getrandom.c"
+
 typeof(__cvdso_getrandom) __kernel_getrandom;
 
 ssize_t __kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
diff --git a/arch/arm64/kernel/vdso/vgettimeofday.c b/arch/arm64/kernel/vdso/vgettimeofday.c
index 9941c5b04f15..090e6a45751d 100644
--- a/arch/arm64/kernel/vdso/vgettimeofday.c
+++ b/arch/arm64/kernel/vdso/vgettimeofday.c
@@ -6,6 +6,8 @@
  *
  */
 
+#include "../../../../lib/vdso/gettimeofday.c"
+
 int __kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
 int __kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
 int __kernel_clock_getres(clockid_t clock_id, struct __kernel_timespec *res);
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 00efdc5d2354..f521d5e4b5cd 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -95,10 +95,6 @@ hostprogs := $(munge)
 c-obj-vdso := note.o
 c-obj-vdso-gettimeofday := vgettimeofday.o
 
-ifneq ($(c-gettimeofday-y),)
-VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y)
-endif
-
 VDSO_CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os
 
 # Build rules
diff --git a/arch/arm64/kernel/vdso32/vgettimeofday.c b/arch/arm64/kernel/vdso32/vgettimeofday.c
index 12d0255cc2cf..1e3f141f0fd4 100644
--- a/arch/arm64/kernel/vdso32/vgettimeofday.c
+++ b/arch/arm64/kernel/vdso32/vgettimeofday.c
@@ -8,6 +8,8 @@
 #define BUILD_VDSO32_64
 #include <vdso/gettime.h>
 
+#include "../../../../lib/vdso/gettimeofday.c"
+
 #ifdef CONFIG_COMPAT_32BIT_TIME
 int __vdso_clock_gettime(clockid_t clock,
 			 struct old_timespec32 *ts)

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/9] ARM: vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 1/9] csky/vdso: Remove all gettimeofday() remnants Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 2/9] arm64/vdso: Directly include the generic vDSO implementations Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 4/9] LoongArch: vDSO: " Thomas Weißschuh
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/arm/vdso/Makefile        | 4 ----
 arch/arm/vdso/vgettimeofday.c | 2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
index cf8cd39ab804..c1dc650672bf 100644
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -27,11 +27,7 @@ CFLAGS_REMOVE_vdso.o = -pg
 
 # Force -O2 to avoid libgcc dependencies
 CFLAGS_REMOVE_vgettimeofday.o = -pg -Os $(RANDSTRUCT_CFLAGS) $(KSTACK_ERASE_CFLAGS) $(GCC_PLUGINS_CFLAGS)
-ifeq ($(c-gettimeofday-y),)
 CFLAGS_vgettimeofday.o = -O2
-else
-CFLAGS_vgettimeofday.o = -O2 -include $(c-gettimeofday-y)
-endif
 
 # Force dependency
 $(obj)/vdso.o : $(obj)/vdso.so
diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c
index 3eebeddbfd18..610f09301f39 100644
--- a/arch/arm/vdso/vgettimeofday.c
+++ b/arch/arm/vdso/vgettimeofday.c
@@ -10,6 +10,8 @@
 #include <asm/unwind.h>
 #include <vdso/gettime.h>
 
+#include "../../../lib/vdso/gettimeofday.c"
+
 #ifdef CONFIG_COMPAT_32BIT_TIME
 int __vdso_clock_gettime(clockid_t clock,
 			 struct old_timespec32 *ts)

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/9] LoongArch: vDSO: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (2 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 3/9] ARM: vdso: " Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 5/9] powerpc/vdso: " Thomas Weißschuh
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/loongarch/vdso/Makefile        | 8 --------
 arch/loongarch/vdso/vgetrandom.c    | 2 ++
 arch/loongarch/vdso/vgettimeofday.c | 2 ++
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile
index 0b84892d084b..7244c6b157a4 100644
--- a/arch/loongarch/vdso/Makefile
+++ b/arch/loongarch/vdso/Makefile
@@ -34,14 +34,6 @@ cflags-vdso := $(ccflags-vdso) \
 aflags-vdso := $(ccflags-vdso) \
 	-D__ASSEMBLY__ -Wa,-gdwarf-2
 
-ifneq ($(c-gettimeofday-y),)
-  CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
-endif
-
-ifneq ($(c-getrandom-y),)
-  CFLAGS_vgetrandom.o += -include $(c-getrandom-y)
-endif
-
 # VDSO linker flags.
 ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
 	$(filter -E%,$(KBUILD_CFLAGS)) -shared --build-id --eh-frame-hdr -T
diff --git a/arch/loongarch/vdso/vgetrandom.c b/arch/loongarch/vdso/vgetrandom.c
index d5f258ac4a36..e72cdde0b8db 100644
--- a/arch/loongarch/vdso/vgetrandom.c
+++ b/arch/loongarch/vdso/vgetrandom.c
@@ -4,6 +4,8 @@
  */
 #include <linux/types.h>
 
+#include "../../../lib/vdso/getrandom.c"
+
 ssize_t __vdso_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
 {
 	return __cvdso_getrandom(buffer, len, flags, opaque_state, opaque_len);
diff --git a/arch/loongarch/vdso/vgettimeofday.c b/arch/loongarch/vdso/vgettimeofday.c
index 0885c1f3a89d..250d188b65af 100644
--- a/arch/loongarch/vdso/vgettimeofday.c
+++ b/arch/loongarch/vdso/vgettimeofday.c
@@ -7,6 +7,8 @@
 #include <linux/types.h>
 #include <vdso/gettime.h>
 
+#include "../../../lib/vdso/gettimeofday.c"
+
 int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 {
 	return __cvdso_clock_gettime(clock, ts);

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/9] powerpc/vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (3 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 4/9] LoongArch: vDSO: " Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 6/9] MIPS: VDSO: " Thomas Weißschuh
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/powerpc/kernel/vdso/Makefile        | 10 +---------
 arch/powerpc/kernel/vdso/vgetrandom.c    |  2 ++
 arch/powerpc/kernel/vdso/vgettimeofday.c |  2 ++
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
index 0d1a49529885..386eb3778934 100644
--- a/arch/powerpc/kernel/vdso/Makefile
+++ b/arch/powerpc/kernel/vdso/Makefile
@@ -11,19 +11,11 @@ obj-vdso64 = sigtramp64-64.o gettimeofday-64.o datapage-64.o cacheflush-64.o not
 obj-vdso32 += getrandom-32.o vgetrandom-chacha-32.o
 obj-vdso64 += getrandom-64.o vgetrandom-chacha-64.o
 
-ifneq ($(c-gettimeofday-y),)
-  CFLAGS_vgettimeofday-32.o += -include $(c-gettimeofday-y)
 # Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true
 # by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is
 # compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code
 # generation is minimal, it will just use r29 instead.
-  CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y) $(call cc-option, -ffixed-r30)
-endif
-
-ifneq ($(c-getrandom-y),)
-  CFLAGS_vgetrandom-32.o += -include $(c-getrandom-y)
-  CFLAGS_vgetrandom-64.o += -include $(c-getrandom-y)
-endif
+CFLAGS_vgettimeofday-64.o += $(call cc-option, -ffixed-r30)
 
 # Build rules
 
diff --git a/arch/powerpc/kernel/vdso/vgetrandom.c b/arch/powerpc/kernel/vdso/vgetrandom.c
index cc79b960a541..e164e2052615 100644
--- a/arch/powerpc/kernel/vdso/vgetrandom.c
+++ b/arch/powerpc/kernel/vdso/vgetrandom.c
@@ -7,6 +7,8 @@
 #include <linux/time.h>
 #include <linux/types.h>
 
+#include "../../../../lib/vdso/getrandom.c"
+
 ssize_t __c_kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state,
 			     size_t opaque_len)
 {
diff --git a/arch/powerpc/kernel/vdso/vgettimeofday.c b/arch/powerpc/kernel/vdso/vgettimeofday.c
index 4b712fb01a3f..11a69411e04a 100644
--- a/arch/powerpc/kernel/vdso/vgettimeofday.c
+++ b/arch/powerpc/kernel/vdso/vgettimeofday.c
@@ -5,6 +5,8 @@
 #include <linux/time.h>
 #include <linux/types.h>
 
+#include "../../../../lib/vdso/gettimeofday.c"
+
 #ifdef __powerpc64__
 int __c_kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts,
 			     const struct vdso_time_data *vd)

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/9] MIPS: VDSO: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (4 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 5/9] powerpc/vdso: " Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 7/9] riscv: vdso: " Thomas Weißschuh
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/mips/vdso/Makefile        | 10 +++-------
 arch/mips/vdso/vgettimeofday.c |  2 ++
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index 00d3ba2c482a..fd07eaedc2d5 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -35,16 +35,12 @@ cflags-vdso := $(ccflags-vdso) \
 aflags-vdso := $(ccflags-vdso) \
 	-D__ASSEMBLY__ -Wa,-gdwarf-2
 
-ifneq ($(c-gettimeofday-y),)
-obj-vdso-y += vgettimeofday.o
-CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y)
+obj-vdso-$(CONFIG_MIPS_GENERIC_GETTIMEOFDAY) += vgettimeofday.o
 
 # config-n32-o32-env.c prepares the environment to build a 32bit vDSO
 # library on a 64bit kernel.
-# Note: Needs to be included before than the generic library.
-CFLAGS_vgettimeofday-o32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y)
-CFLAGS_vgettimeofday-n32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y)
-endif
+CFLAGS_vgettimeofday-o32.o = -include $(src)/config-n32-o32-env.c
+CFLAGS_vgettimeofday-n32.o = -include $(src)/config-n32-o32-env.c
 
 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
 
diff --git a/arch/mips/vdso/vgettimeofday.c b/arch/mips/vdso/vgettimeofday.c
index a1fb06b8973e..60831451ba3e 100644
--- a/arch/mips/vdso/vgettimeofday.c
+++ b/arch/mips/vdso/vgettimeofday.c
@@ -11,6 +11,8 @@
 #include <linux/types.h>
 #include <vdso/gettime.h>
 
+#include "../../../lib/vdso/gettimeofday.c"
+
 #if _MIPS_SIM != _MIPS_SIM_ABI64
 
 #ifdef CONFIG_COMPAT_32BIT_TIME

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 7/9] riscv: vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (5 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 6/9] MIPS: VDSO: " Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 8/9] s390/vdso: " Thomas Weißschuh
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/riscv/kernel/vdso/Makefile        | 10 ++--------
 arch/riscv/kernel/vdso/getrandom.c     |  2 ++
 arch/riscv/kernel/vdso/vgettimeofday.c |  2 ++
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
index c023046a3fd7..f9ce25984bff 100644
--- a/arch/riscv/kernel/vdso/Makefile
+++ b/arch/riscv/kernel/vdso/Makefile
@@ -44,14 +44,8 @@ asflags-y += $(CFI_FULL)
 
 ccflags-remove-y += $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_LTO)
 
-ifneq ($(c-gettimeofday-y),)
-  CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
-endif
-
-ifneq ($(c-getrandom-y),)
-  CFLAGS_getrandom.o += -fPIC -include $(c-getrandom-y)
-endif
-
+CFLAGS_vgettimeofday.o += -fPIC
+CFLAGS_getrandom.o += -fPIC
 CFLAGS_hwprobe.o += -fPIC
 
 # Build rules
diff --git a/arch/riscv/kernel/vdso/getrandom.c b/arch/riscv/kernel/vdso/getrandom.c
index f21922e8cebd..05711a04f547 100644
--- a/arch/riscv/kernel/vdso/getrandom.c
+++ b/arch/riscv/kernel/vdso/getrandom.c
@@ -4,6 +4,8 @@
  */
 #include <linux/types.h>
 
+#include "../../../../lib/vdso/getrandom.c"
+
 ssize_t __vdso_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
 {
 	return __cvdso_getrandom(buffer, len, flags, opaque_state, opaque_len);
diff --git a/arch/riscv/kernel/vdso/vgettimeofday.c b/arch/riscv/kernel/vdso/vgettimeofday.c
index b35057802584..a7134b5aebd6 100644
--- a/arch/riscv/kernel/vdso/vgettimeofday.c
+++ b/arch/riscv/kernel/vdso/vgettimeofday.c
@@ -10,6 +10,8 @@
 #include <linux/types.h>
 #include <vdso/gettime.h>
 
+#include "../../../../lib/vdso/gettimeofday.c"
+
 int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 {
 	return __cvdso_clock_gettime(clock, ts);

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 8/9] s390/vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (6 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 7/9] riscv: vdso: " Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:30 ` [PATCH 9/9] vdso: Drop the old inclusion machinery Thomas Weißschuh
  2026-12-04  7:41 ` [PATCH 0/9] vdso: Directly include the generic vDSO implementations sashiko-bot
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 9/9] vdso: Drop the old inclusion machinery
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (7 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 8/9] s390/vdso: " Thomas Weißschuh
@ 2026-12-04  7:30 ` Thomas Weißschuh
  2026-12-04  7:41 ` [PATCH 0/9] vdso: Directly include the generic vDSO implementations sashiko-bot
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:30 UTC (permalink / raw)
  To: Thomas Gleixner, Andy Lutomirski, Vincenzo Frascino
  Cc: linux-csky, linux-kernel, linux-arm-kernel, loongarch,
	linuxppc-dev, linux-mips, linux-riscv, linux-s390,
	Thomas Weißschuh

All users have been replaced by direct inclusions.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 lib/vdso/Makefile.include | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/lib/vdso/Makefile.include b/lib/vdso/Makefile.include
index cedbf15f8087..25aa53cfdc3b 100644
--- a/lib/vdso/Makefile.include
+++ b/lib/vdso/Makefile.include
@@ -1,11 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-GENERIC_VDSO_MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-GENERIC_VDSO_DIR := $(dir $(GENERIC_VDSO_MK_PATH))
-
-c-gettimeofday-$(CONFIG_GENERIC_GETTIMEOFDAY) := $(addprefix $(GENERIC_VDSO_DIR), gettimeofday.c)
-c-getrandom-$(CONFIG_VDSO_GETRANDOM) := $(addprefix $(GENERIC_VDSO_DIR), getrandom.c)
-
 # This cmd checks that the vdso library does not contain dynamic relocations.
 # It has to be called after the linking of the vdso library and requires it
 # as a parameter.

-- 
2.56.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/9] arm64/vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 ` [PATCH 2/9] arm64/vdso: Directly include the generic vDSO implementations Thomas Weißschuh
@ 2026-12-04  7:38   ` sashiko-bot
  0 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-12-04  7:38 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] arm64/vdso: dangling VDSO_CFLAGS_gettimeofday_o and dead vdso32
  rule
--

commit 7c017d5e800bf0df985cc1885c862ee263cbf241
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

arm64/vdso: Directly include the generic vDSO implementations

This commit replaces the compiler -include flags in the arm64 vDSO and
compat vDSO Makefiles with direct #include directives for
lib/vdso/gettimeofday.c and lib/vdso/getrandom.c.

> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 00efdc5d23543..f521d5e4b5cdf 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -95,10 +95,6 @@ hostprogs := $(munge)
>  c-obj-vdso := note.o
>  c-obj-vdso-gettimeofday := vgettimeofday.o
>  
> -ifneq ($(c-gettimeofday-y),)
> -VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y)
> -endif
> -
>  VDSO_CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os
>  
>  # Build rules

[Severity: Low]
Now that the only assignment to VDSO_CFLAGS_gettimeofday_o is removed,
cmd_vdsocc_gettimeofday references an undefined variable and becomes
identical to cmd_vdsocc.  Could vgettimeofday.o be folded into c-obj-vdso
and the separate c-obj-vdso-gettimeofday list, pattern rule, and
cmd_vdsocc_gettimeofday definitions be dropped?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-vdso-generic-include-v1-0-8f4ed31bfbbd@linutronix.de?part=2

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/9] vdso: Directly include the generic vDSO implementations
  2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
                   ` (8 preceding siblings ...)
  2026-12-04  7:30 ` [PATCH 9/9] vdso: Drop the old inclusion machinery Thomas Weißschuh
@ 2026-12-04  7:41 ` sashiko-bot
  9 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-12-04  7:41 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger

Sashiko has finished reviewing this 9-patch series:

- Patches 1 and 3-9: no issues found.
- Patch 2 ("arm64/vdso: Directly include the generic vDSO implem..."): 1
  potential issue (1 Low)

A detailed review has been sent as a separate reply to patch 2.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-vdso-generic-include-v1-0-8f4ed31bfbbd@linutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-12-04  7:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  7:30 [PATCH 0/9] vdso: Directly include the generic vDSO implementations Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 1/9] csky/vdso: Remove all gettimeofday() remnants Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 2/9] arm64/vdso: Directly include the generic vDSO implementations Thomas Weißschuh
2026-12-04  7:38   ` sashiko-bot
2026-12-04  7:30 ` [PATCH 3/9] ARM: vdso: " Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 4/9] LoongArch: vDSO: " Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 5/9] powerpc/vdso: " Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 6/9] MIPS: VDSO: " Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 7/9] riscv: vdso: " Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 8/9] s390/vdso: " Thomas Weißschuh
2026-12-04  7:30 ` [PATCH 9/9] vdso: Drop the old inclusion machinery Thomas Weißschuh
2026-12-04  7:41 ` [PATCH 0/9] vdso: Directly include the generic vDSO implementations sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox