Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH 00/15] vdso: Clean up the vsyscall.h headers
@ 2026-09-09  8:51 Thomas Weißschuh
  2026-09-09  8:51 ` [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header Thomas Weißschuh
                   ` (14 more replies)
  0 siblings, 15 replies; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The vsyscall.h headers are a mess. Some of that was necessary back when
some architectures where not using the generic vDSO infrastructure.
Now that this is not necessary anymore, the headers can be cleaned up
and many of the can be deleted altogether.

The recipient list is trimmed to only the vDSO maintainers and the
architecture lists.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (15):
      vdso: Move the kernel-side time update helpers to a new header
      vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c
      vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c
      vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c
      vdso: Delete asm-generic/vdso/vsyscall.h
      x86/vdso: Move vDSO page definitions to asm/vdso.h
      sparc/vdso: Move __VDSO_PAGES to asm/vdso.h
      s390/vdso: Delete asm/vdso/vsyscall.h inclusions
      sparc/vdso: Delete asm/vdso/vsyscall.h inclusion
      x86/vdso: Delete asm/vdso/vsyscall.h inclusions
      arm64/vdso: Delete asm/vdso/vsyscall.h inclusions
      riscv/hwprobe: Include vdso/datapage.h
      vdso: Remove unnecessary vdso/vsyscall.h includes
      vdso: Add asm-generic/vdso/vsyscall.h
      vdso: Remove __ASSEMBLER__ guards from vsyscall.h

 MAINTAINERS                                  |  2 +-
 arch/arm/include/asm/vdso/vsyscall.h         |  7 ------
 arch/arm/kernel/vdso.c                       |  1 -
 arch/arm64/include/asm/vdso/getrandom.h      |  1 -
 arch/arm64/include/asm/vdso/vsyscall.h       |  7 ------
 arch/arm64/kernel/vdso.c                     |  1 -
 arch/arm64/kernel/vdso/vdso.lds.S            |  1 -
 arch/loongarch/include/asm/vdso/vsyscall.h   | 14 -----------
 arch/loongarch/kernel/vdso.c                 |  1 -
 arch/mips/include/asm/vdso/vsyscall.h        | 16 -------------
 arch/mips/kernel/vdso.c                      |  1 -
 arch/powerpc/include/asm/vdso/vsyscall.h     | 14 -----------
 arch/riscv/include/asm/vdso/vsyscall.h       | 14 -----------
 arch/riscv/kernel/sys_hwprobe.c              |  2 +-
 arch/riscv/kernel/vdso.c                     |  1 -
 arch/s390/include/asm/vdso/getrandom.h       |  1 -
 arch/s390/include/asm/vdso/vsyscall.h        | 16 -------------
 arch/s390/kernel/time.c                      |  6 ++---
 arch/s390/kernel/vdso.c                      |  1 -
 arch/s390/kernel/vdso/vdso.lds.S             |  1 -
 arch/sparc/include/asm/vdso.h                |  6 +++++
 arch/sparc/include/asm/vdso/vsyscall.h       | 10 --------
 arch/sparc/vdso/vdso-layout.lds.S            |  2 +-
 arch/sparc/vdso/vma.c                        |  1 -
 arch/x86/entry/vdso/common/vdso-layout.lds.S |  1 -
 arch/x86/entry/vdso/vma.c                    |  1 -
 arch/x86/include/asm/vdso.h                  |  7 ++++++
 arch/x86/include/asm/vdso/vsyscall.h         | 22 -----------------
 include/asm-generic/Kbuild                   |  1 +
 include/asm-generic/vdso/vsyscall.h          | 35 ----------------------------
 include/linux/vdso_time.h                    |  8 +++++++
 include/vdso/vsyscall.h                      |  7 ------
 kernel/time/vsyscall.c                       | 25 +++++++++++++++-----
 lib/vdso/getrandom.c                         |  8 +++++--
 lib/vdso/gettimeofday.c                      | 10 +++++---
 35 files changed, 60 insertions(+), 192 deletions(-)
---
base-commit: 1c2a9f9d89050cd9f2b2280060a9442338a1e6fe
change-id: 20260812-vdso-asm-generic-vsyscall-h-0f66fe59ad5c

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


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

* [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:03   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 02/15] vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c Thomas Weißschuh
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The vdso/ header namespace is meant for symbols which are usable from
vDSO userspace code. However vdso_update_begin() and vdso_update_end()
are only usable from the kernel.

Move them into a new header in the linux/ namespace. Also rename them to
make clear that they are only for time-related data.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 MAINTAINERS               |  1 +
 arch/s390/kernel/time.c   |  5 +++--
 include/linux/vdso_time.h |  8 ++++++++
 include/vdso/vsyscall.h   |  3 ---
 kernel/time/vsyscall.c    | 13 +++++++------
 5 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 3a19da74d00c..562ace172594 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11066,6 +11066,7 @@ S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
 F:	include/asm-generic/vdso/vsyscall.h
 F:	include/linux/vdso_datastore.h
+F:	include/linux/vdso_time.h
 F:	include/vdso/
 F:	kernel/time/namespace_vdso.c
 F:	kernel/time/vsyscall.c
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 2b989bebd220..161628f6906f 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -39,6 +39,7 @@
 #include <linux/gfp.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
+#include <linux/vdso_time.h>
 #include <vdso/vsyscall.h>
 #include <vdso/clocksource.h>
 #include <vdso/helpers.h>
@@ -527,7 +528,7 @@ static int stp_sync_clock(void *data)
 			cpu_relax();
 		rc = 0;
 		if (stp_info.todoff || stp_info.tmd != 2) {
-			flags = vdso_update_begin();
+			flags = vdso_time_update_begin();
 			rc = chsc_sstpc(stp_page, STP_OP_SYNC, 0,
 					&clock_delta);
 			if (rc == 0) {
@@ -537,7 +538,7 @@ static int stp_sync_clock(void *data)
 				if (rc == 0 && stp_info.tmd != 2)
 					rc = -EAGAIN;
 			}
-			vdso_update_end(flags);
+			vdso_time_update_end(flags);
 		}
 		sync->in_sync = rc ? -EAGAIN : 1;
 		xchg(&first, 0);
diff --git a/include/linux/vdso_time.h b/include/linux/vdso_time.h
new file mode 100644
index 000000000000..6d81ee3a3c9c
--- /dev/null
+++ b/include/linux/vdso_time.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_VDSO_TIME_H
+#define _LINUX_VDSO_TIME_H
+
+unsigned long vdso_time_update_begin(void);
+void vdso_time_update_end(unsigned long flags);
+
+#endif /* _LINUX_VDSO_TIME_H */
diff --git a/include/vdso/vsyscall.h b/include/vdso/vsyscall.h
index c5c2a2c07857..29dd4e097220 100644
--- a/include/vdso/vsyscall.h
+++ b/include/vdso/vsyscall.h
@@ -6,9 +6,6 @@
 
 #include <asm/vdso/vsyscall.h>
 
-unsigned long vdso_update_begin(void);
-void vdso_update_end(unsigned long flags);
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __VDSO_VSYSCALL_H */
diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c
index aa59919b8f2c..12e205d86e7f 100644
--- a/kernel/time/vsyscall.c
+++ b/kernel/time/vsyscall.c
@@ -9,6 +9,7 @@
 
 #include <linux/hrtimer.h>
 #include <linux/timekeeper_internal.h>
+#include <linux/vdso_time.h>
 #include <vdso/datapage.h>
 #include <vdso/helpers.h>
 #include <vdso/vsyscall.h>
@@ -177,7 +178,7 @@ void vdso_time_update_aux(struct timekeeper *tk)
 #endif
 
 /**
- * vdso_update_begin - Start of a VDSO update section
+ * vdso_time_update_begin - Start of a VDSO update section
  *
  * Allows architecture code to safely update the architecture specific VDSO
  * data. Disables interrupts, acquires timekeeper lock to serialize against
@@ -188,7 +189,7 @@ void vdso_time_update_aux(struct timekeeper *tk)
  * Returns: Saved interrupt flags which need to be handed in to
  * vdso_update_end().
  */
-unsigned long vdso_update_begin(void)
+unsigned long vdso_time_update_begin(void)
 {
 	struct vdso_time_data *vdata = vdso_k_time_data;
 	unsigned long flags = timekeeper_lock_irqsave();
@@ -198,14 +199,14 @@ unsigned long vdso_update_begin(void)
 }
 
 /**
- * vdso_update_end - End of a VDSO update section
- * @flags:	Interrupt flags as returned from vdso_update_begin()
+ * vdso_time_update_end - End of a VDSO update section
+ * @flags:	Interrupt flags as returned from vdso_time_update_begin()
  *
- * Pairs with vdso_update_begin(). Marks vdso data consistent, invokes data
+ * Pairs with vdso_time_update_begin(). Marks vdso data consistent, invokes data
  * synchronization if the architecture requires it, drops timekeeper lock
  * and restores interrupt flags.
  */
-void vdso_update_end(unsigned long flags)
+void vdso_time_update_end(unsigned long flags)
 {
 	struct vdso_time_data *vdata = vdso_k_time_data;
 

-- 
2.55.0


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

* [PATCH 02/15] vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
  2026-09-09  8:51 ` [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:57   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 03/15] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c Thomas Weißschuh
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

__arch_get_vdso_u_time_data() is only used in gettimeofday.c. vsyscall.h
has become a dumping ground for different kinds of fallbacks.

Move the fallback function definition into gettimeofday.c,
similar to other fallbacks.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 include/asm-generic/vdso/vsyscall.h | 7 -------
 lib/vdso/gettimeofday.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 a6b03cfba0e2..fe12fb1fb442 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_time_data
-static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
-{
-	return &vdso_u_time_data;
-}
-#endif
-
 #ifndef __arch_get_vdso_u_rng_data
 static __always_inline const struct vdso_rng_data *__arch_get_vdso_u_rng_data(void)
 {
diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index f7a591aba59f..b867c2301d5c 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -93,6 +93,13 @@ static inline bool vdso_cycles_ok(u64 cycles)
 }
 #endif
 
+#ifndef __arch_get_vdso_u_time_data
+static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
+{
+	return &vdso_u_time_data;
+}
+#endif
+
 static __always_inline bool vdso_clockid_valid(clockid_t clock)
 {
 	/* Check for negative values or invalid clocks */

-- 
2.55.0


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

* [PATCH 03/15] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
  2026-09-09  8:51 ` [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header Thomas Weißschuh
  2026-09-09  8:51 ` [PATCH 02/15] vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:54   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 04/15] vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c Thomas Weißschuh
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

__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>
---
 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 fe12fb1fb442..cdf7b39cd349 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 2851afa9154f..6ff46549281c 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);	\

-- 
2.55.0


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

* [PATCH 04/15] vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (2 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 03/15] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:13   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 05/15] vdso: Delete asm-generic/vdso/vsyscall.h Thomas Weißschuh
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

__arch_update_vdso_clock() and __arch_sync_vdso_time_data() are only
used in vsyscall.c. vsyscall.h has become a dumping ground for different
kinds of fallbacks.

Move the fallback function definitions into vsyscall.c.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 include/asm-generic/vdso/vsyscall.h | 11 -----------
 kernel/time/vsyscall.c              | 12 ++++++++++++
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
index cdf7b39cd349..cfb740e82cb5 100644
--- a/include/asm-generic/vdso/vsyscall.h
+++ b/include/asm-generic/vdso/vsyscall.h
@@ -4,17 +4,6 @@
 
 #ifndef __ASSEMBLER__
 
-#ifndef __arch_update_vdso_clock
-static __always_inline void __arch_update_vdso_clock(struct vdso_clock *vc)
-{
-}
-#endif /* __arch_update_vdso_clock */
-
-#ifndef __arch_sync_vdso_time_data
-static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
-{
-}
-#endif /* __arch_sync_vdso_time_data */
 
 #endif /* !__ASSEMBLER__ */
 
diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c
index 12e205d86e7f..193a02d78b11 100644
--- a/kernel/time/vsyscall.c
+++ b/kernel/time/vsyscall.c
@@ -16,6 +16,18 @@
 
 #include "timekeeping_internal.h"
 
+#ifndef __arch_update_vdso_clock
+static __always_inline void __arch_update_vdso_clock(struct vdso_clock *vc)
+{
+}
+#endif /* __arch_update_vdso_clock */
+
+#ifndef __arch_sync_vdso_time_data
+static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
+{
+}
+#endif /* __arch_sync_vdso_time_data */
+
 static inline void fill_clock_configuration(struct vdso_clock *vc, const struct tk_read_base *base)
 {
 	vc->cycle_last	= base->cycle_last;

-- 
2.55.0


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

* [PATCH 05/15] vdso: Delete asm-generic/vdso/vsyscall.h
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (3 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 04/15] vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:54   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 06/15] x86/vdso: Move vDSO page definitions to asm/vdso.h Thomas Weißschuh
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

Recent refactoring have made the header empty.

Remove it and its mentions.

Also that header was never a real asm-generic header anyways.
It had no reason to be in the asm-generic directory.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 MAINTAINERS                                |  1 -
 arch/arm/include/asm/vdso/vsyscall.h       |  3 ---
 arch/arm64/include/asm/vdso/vsyscall.h     |  3 ---
 arch/loongarch/include/asm/vdso/vsyscall.h |  3 ---
 arch/mips/include/asm/vdso/vsyscall.h      |  3 ---
 arch/powerpc/include/asm/vdso/vsyscall.h   |  3 ---
 arch/riscv/include/asm/vdso/vsyscall.h     |  3 ---
 arch/s390/include/asm/vdso/vsyscall.h      |  3 ---
 arch/sparc/include/asm/vdso/vsyscall.h     |  2 --
 arch/x86/include/asm/vdso/vsyscall.h       |  3 ---
 include/asm-generic/vdso/vsyscall.h        | 10 ----------
 11 files changed, 37 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 562ace172594..21c590dd28b6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11064,7 +11064,6 @@ M:	Vincenzo Frascino <vincenzo.frascino@arm.com>
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
-F:	include/asm-generic/vdso/vsyscall.h
 F:	include/linux/vdso_datastore.h
 F:	include/linux/vdso_time.h
 F:	include/vdso/
diff --git a/arch/arm/include/asm/vdso/vsyscall.h b/arch/arm/include/asm/vdso/vsyscall.h
index ff1c729af05f..14f2ea9d8640 100644
--- a/arch/arm/include/asm/vdso/vsyscall.h
+++ b/arch/arm/include/asm/vdso/vsyscall.h
@@ -14,9 +14,6 @@ void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
 }
 #define __arch_sync_vdso_time_data __arch_sync_vdso_time_data
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/arm64/include/asm/vdso/vsyscall.h b/arch/arm64/include/asm/vdso/vsyscall.h
index 3f3c8eb74e2e..7d9d6bdd58b2 100644
--- a/arch/arm64/include/asm/vdso/vsyscall.h
+++ b/arch/arm64/include/asm/vdso/vsyscall.h
@@ -19,9 +19,6 @@ void __arch_update_vdso_clock(struct vdso_clock *vc)
 }
 #define __arch_update_vdso_clock __arch_update_vdso_clock
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/loongarch/include/asm/vdso/vsyscall.h b/arch/loongarch/include/asm/vdso/vsyscall.h
index 558eb9dfda52..db653780519d 100644
--- a/arch/loongarch/include/asm/vdso/vsyscall.h
+++ b/arch/loongarch/include/asm/vdso/vsyscall.h
@@ -6,9 +6,6 @@
 
 #include <vdso/datapage.h>
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/mips/include/asm/vdso/vsyscall.h b/arch/mips/include/asm/vdso/vsyscall.h
index 0f061a9babd1..f01ab2e15c08 100644
--- a/arch/mips/include/asm/vdso/vsyscall.h
+++ b/arch/mips/include/asm/vdso/vsyscall.h
@@ -8,9 +8,6 @@
 
 #include <vdso/datapage.h>
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/powerpc/include/asm/vdso/vsyscall.h b/arch/powerpc/include/asm/vdso/vsyscall.h
index bee18e8660a0..6a6510fa8217 100644
--- a/arch/powerpc/include/asm/vdso/vsyscall.h
+++ b/arch/powerpc/include/asm/vdso/vsyscall.h
@@ -6,9 +6,6 @@
 
 #include <asm/vdso_datapage.h>
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* _ASM_POWERPC_VDSO_VSYSCALL_H */
diff --git a/arch/riscv/include/asm/vdso/vsyscall.h b/arch/riscv/include/asm/vdso/vsyscall.h
index 558eb9dfda52..db653780519d 100644
--- a/arch/riscv/include/asm/vdso/vsyscall.h
+++ b/arch/riscv/include/asm/vdso/vsyscall.h
@@ -6,9 +6,6 @@
 
 #include <vdso/datapage.h>
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/s390/include/asm/vdso/vsyscall.h b/arch/s390/include/asm/vdso/vsyscall.h
index b00acec8ddbc..c74c307c320c 100644
--- a/arch/s390/include/asm/vdso/vsyscall.h
+++ b/arch/s390/include/asm/vdso/vsyscall.h
@@ -8,9 +8,6 @@
 #include <vdso/datapage.h>
 #include <asm/vdso.h>
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/sparc/include/asm/vdso/vsyscall.h b/arch/sparc/include/asm/vdso/vsyscall.h
index 8bfe703fedc5..b08e0bd5e309 100644
--- a/arch/sparc/include/asm/vdso/vsyscall.h
+++ b/arch/sparc/include/asm/vdso/vsyscall.h
@@ -5,6 +5,4 @@
 
 #define __VDSO_PAGES 4
 
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* _ASM_SPARC_VDSO_VSYSCALL_H */
diff --git a/arch/x86/include/asm/vdso/vsyscall.h b/arch/x86/include/asm/vdso/vsyscall.h
index 4aa311a923f2..57598db8763b 100644
--- a/arch/x86/include/asm/vdso/vsyscall.h
+++ b/arch/x86/include/asm/vdso/vsyscall.h
@@ -14,9 +14,6 @@
 #include <vdso/datapage.h>
 #include <asm/vgtod.h>
 
-/* The asm-generic header needs to be included after the definitions above */
-#include <asm-generic/vdso/vsyscall.h>
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
deleted file mode 100644
index cfb740e82cb5..000000000000
--- a/include/asm-generic/vdso/vsyscall.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_GENERIC_VSYSCALL_H
-#define __ASM_GENERIC_VSYSCALL_H
-
-#ifndef __ASSEMBLER__
-
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_GENERIC_VSYSCALL_H */

-- 
2.55.0


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

* [PATCH 06/15] x86/vdso: Move vDSO page definitions to asm/vdso.h
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (4 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 05/15] vdso: Delete asm-generic/vdso/vsyscall.h Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:00   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 07/15] sparc/vdso: Move __VDSO_PAGES " Thomas Weißschuh
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

Most architectures define the vDSO page macros in asm/vdso.h.

Align the x86 headers.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/x86/include/asm/vdso.h          | 7 +++++++
 arch/x86/include/asm/vdso/vsyscall.h | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h
index 4e735158c1b2..071e4a262b50 100644
--- a/arch/x86/include/asm/vdso.h
+++ b/arch/x86/include/asm/vdso.h
@@ -6,6 +6,13 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 
+#define __VDSO_PAGES	6
+
+#define VDSO_NR_VCLOCK_PAGES	2
+#define VDSO_VCLOCK_PAGES_START(_b)	((_b) + (__VDSO_PAGES - VDSO_NR_VCLOCK_PAGES) * PAGE_SIZE)
+#define VDSO_PAGE_PVCLOCK_OFFSET	0
+#define VDSO_PAGE_HVCLOCK_OFFSET	1
+
 #ifndef __ASSEMBLER__
 
 #include <linux/mm_types.h>
diff --git a/arch/x86/include/asm/vdso/vsyscall.h b/arch/x86/include/asm/vdso/vsyscall.h
index 57598db8763b..65d10f4cc718 100644
--- a/arch/x86/include/asm/vdso/vsyscall.h
+++ b/arch/x86/include/asm/vdso/vsyscall.h
@@ -2,13 +2,6 @@
 #ifndef __ASM_VDSO_VSYSCALL_H
 #define __ASM_VDSO_VSYSCALL_H
 
-#define __VDSO_PAGES	6
-
-#define VDSO_NR_VCLOCK_PAGES	2
-#define VDSO_VCLOCK_PAGES_START(_b)	((_b) + (__VDSO_PAGES - VDSO_NR_VCLOCK_PAGES) * PAGE_SIZE)
-#define VDSO_PAGE_PVCLOCK_OFFSET	0
-#define VDSO_PAGE_HVCLOCK_OFFSET	1
-
 #ifndef __ASSEMBLER__
 
 #include <vdso/datapage.h>

-- 
2.55.0


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

* [PATCH 07/15] sparc/vdso: Move __VDSO_PAGES to asm/vdso.h
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (5 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 06/15] x86/vdso: Move vDSO page definitions to asm/vdso.h Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:01   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 08/15] s390/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

Most architectures define the __VDSO_PAGES page macro in asm/vdso.h.

Align the SPARC headers.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/sparc/include/asm/vdso.h          | 6 ++++++
 arch/sparc/include/asm/vdso/vsyscall.h | 2 --
 arch/sparc/vdso/vdso-layout.lds.S      | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/include/asm/vdso.h b/arch/sparc/include/asm/vdso.h
index f08562d10215..b17c37c8075b 100644
--- a/arch/sparc/include/asm/vdso.h
+++ b/arch/sparc/include/asm/vdso.h
@@ -5,6 +5,10 @@
 #ifndef _ASM_SPARC_VDSO_H
 #define _ASM_SPARC_VDSO_H
 
+#define __VDSO_PAGES 4
+
+#ifndef __ASSEMBLER__
+
 struct vdso_image {
 	void *data;
 	unsigned long size;   /* Always a multiple of PAGE_SIZE */
@@ -17,4 +21,6 @@ extern const struct vdso_image vdso_image_64_builtin;
 extern const struct vdso_image vdso_image_32_builtin;
 #endif
 
+#endif /* __ASSEMBLER__ */
+
 #endif /* _ASM_SPARC_VDSO_H */
diff --git a/arch/sparc/include/asm/vdso/vsyscall.h b/arch/sparc/include/asm/vdso/vsyscall.h
index b08e0bd5e309..ff62b291e4eb 100644
--- a/arch/sparc/include/asm/vdso/vsyscall.h
+++ b/arch/sparc/include/asm/vdso/vsyscall.h
@@ -3,6 +3,4 @@
 #ifndef _ASM_SPARC_VDSO_VSYSCALL_H
 #define _ASM_SPARC_VDSO_VSYSCALL_H
 
-#define __VDSO_PAGES 4
-
 #endif /* _ASM_SPARC_VDSO_VSYSCALL_H */
diff --git a/arch/sparc/vdso/vdso-layout.lds.S b/arch/sparc/vdso/vdso-layout.lds.S
index 180e5d0ee071..920396203a2e 100644
--- a/arch/sparc/vdso/vdso-layout.lds.S
+++ b/arch/sparc/vdso/vdso-layout.lds.S
@@ -6,7 +6,7 @@
 
 #include <vdso/datapage.h>
 #include <vdso/page.h>
-#include <asm/vdso/vsyscall.h>
+#include <asm/vdso.h>
 
 SECTIONS
 {

-- 
2.55.0


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

* [PATCH 08/15] s390/vdso: Delete asm/vdso/vsyscall.h inclusions
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (6 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 07/15] sparc/vdso: Move __VDSO_PAGES " Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:56   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 09/15] sparc/vdso: Delete asm/vdso/vsyscall.h inclusion Thomas Weißschuh
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The inclusions are unnecessary, remove them.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/s390/include/asm/vdso/getrandom.h | 1 -
 arch/s390/kernel/vdso.c                | 1 -
 arch/s390/kernel/vdso/vdso.lds.S       | 1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/s390/include/asm/vdso/getrandom.h b/arch/s390/include/asm/vdso/getrandom.h
index 6741a27199f8..ff5882f2fc70 100644
--- a/arch/s390/include/asm/vdso/getrandom.h
+++ b/arch/s390/include/asm/vdso/getrandom.h
@@ -6,7 +6,6 @@
 #ifndef __ASSEMBLER__
 
 #include <vdso/datapage.h>
-#include <asm/vdso/vsyscall.h>
 #include <asm/syscall.h>
 #include <asm/unistd.h>
 #include <asm/page.h>
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 0fe616c49fcc..a905f989f910 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -18,7 +18,6 @@
 #include <linux/random.h>
 #include <linux/vdso_datastore.h>
 #include <vdso/datapage.h>
-#include <asm/vdso/vsyscall.h>
 #include <asm/alternative.h>
 #include <asm/vdso.h>
 
diff --git a/arch/s390/kernel/vdso/vdso.lds.S b/arch/s390/kernel/vdso/vdso.lds.S
index 841daeec4be2..6bcdb64315f2 100644
--- a/arch/s390/kernel/vdso/vdso.lds.S
+++ b/arch/s390/kernel/vdso/vdso.lds.S
@@ -4,7 +4,6 @@
  * library
  */
 
-#include <asm/vdso/vsyscall.h>
 #include <asm/page.h>
 #include <asm/vdso.h>
 #include <asm-generic/vmlinux.lds.h>

-- 
2.55.0


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

* [PATCH 09/15] sparc/vdso: Delete asm/vdso/vsyscall.h inclusion
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (7 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 08/15] s390/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:55   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 10/15] x86/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The inclusion is unnecessary, remove it.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/sparc/vdso/vma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/sparc/vdso/vma.c b/arch/sparc/vdso/vma.c
index 60029d60f4d3..ab6626c1ee61 100644
--- a/arch/sparc/vdso/vma.c
+++ b/arch/sparc/vdso/vma.c
@@ -23,7 +23,6 @@
 #include <asm/page.h>
 
 #include <vdso/datapage.h>
-#include <asm/vdso/vsyscall.h>
 
 unsigned int __read_mostly vdso_enabled = 1;
 

-- 
2.55.0


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

* [PATCH 10/15] x86/vdso: Delete asm/vdso/vsyscall.h inclusions
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (8 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 09/15] sparc/vdso: Delete asm/vdso/vsyscall.h inclusion Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:02   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 11/15] arm64/vdso: " Thomas Weißschuh
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The inclusions are unnecessary, remove them.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/x86/entry/vdso/common/vdso-layout.lds.S | 1 -
 arch/x86/entry/vdso/vma.c                    | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/x86/entry/vdso/common/vdso-layout.lds.S b/arch/x86/entry/vdso/common/vdso-layout.lds.S
index a1e30be3e83d..f190efbc640e 100644
--- a/arch/x86/entry/vdso/common/vdso-layout.lds.S
+++ b/arch/x86/entry/vdso/common/vdso-layout.lds.S
@@ -1,6 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/vdso.h>
-#include <asm/vdso/vsyscall.h>
 #include <vdso/datapage.h>
 
 /*
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 18dfd80a81ef..4bd3b22beea9 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -25,7 +25,6 @@
 #include <asm/page.h>
 #include <asm/desc.h>
 #include <asm/cpufeature.h>
-#include <asm/vdso/vsyscall.h>
 #include <clocksource/hyperv_timer.h>
 
 static_assert(VDSO_NR_PAGES + VDSO_NR_VCLOCK_PAGES == __VDSO_PAGES);

-- 
2.55.0


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

* [PATCH 11/15] arm64/vdso: Delete asm/vdso/vsyscall.h inclusions
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (9 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 10/15] x86/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:56   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 12/15] riscv/hwprobe: Include vdso/datapage.h Thomas Weißschuh
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The inclusions are unnecessary, remove them.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/arm64/include/asm/vdso/getrandom.h | 1 -
 arch/arm64/kernel/vdso/vdso.lds.S       | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm64/include/asm/vdso/getrandom.h b/arch/arm64/include/asm/vdso/getrandom.h
index da1d58bbfabe..d9b9104d4ea1 100644
--- a/arch/arm64/include/asm/vdso/getrandom.h
+++ b/arch/arm64/include/asm/vdso/getrandom.h
@@ -6,7 +6,6 @@
 #ifndef __ASSEMBLER__
 
 #include <asm/unistd.h>
-#include <asm/vdso/vsyscall.h>
 #include <vdso/datapage.h>
 
 /**
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
index 52314be29191..6334ca0a7673 100644
--- a/arch/arm64/kernel/vdso/vdso.lds.S
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
@@ -11,7 +11,6 @@
 #include <linux/const.h>
 #include <asm/page.h>
 #include <asm/vdso.h>
-#include <asm/vdso/vsyscall.h>
 #include <asm-generic/vmlinux.lds.h>
 #include <vdso/datapage.h>
 

-- 
2.55.0


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

* [PATCH 12/15] riscv/hwprobe: Include vdso/datapage.h
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (10 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 11/15] arm64/vdso: " Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  8:55   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 13/15] vdso: Remove unnecessary vdso/vsyscall.h includes Thomas Weißschuh
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

The symbol vdso_k_arch_data is provided by vdso/datapage.h,
which is currently not included explicitly. An upcoming refactoring will
remove the currently used transitive inclusion.

Add an explicit inclusion.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/riscv/kernel/sys_hwprobe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c
index bd6ca7d769da..0f42101ad935 100644
--- a/arch/riscv/kernel/sys_hwprobe.c
+++ b/arch/riscv/kernel/sys_hwprobe.c
@@ -18,6 +18,7 @@
 #include <asm/vendor_extensions/mips_hwprobe.h>
 #include <asm/vendor_extensions/sifive_hwprobe.h>
 #include <asm/vendor_extensions/thead_hwprobe.h>
+#include <vdso/datapage.h>
 #include <vdso/vsyscall.h>
 
 

-- 
2.55.0


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

* [PATCH 13/15] vdso: Remove unnecessary vdso/vsyscall.h includes
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (11 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 12/15] riscv/hwprobe: Include vdso/datapage.h Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:01   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 14/15] vdso: Add asm-generic/vdso/vsyscall.h Thomas Weißschuh
  2026-09-09  8:51 ` [PATCH 15/15] vdso: Remove __ASSEMBLER__ guards from vsyscall.h Thomas Weißschuh
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

None of these files uses anything from the header.

Remove the inclusion.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/arm/kernel/vdso.c          | 1 -
 arch/arm64/kernel/vdso.c        | 1 -
 arch/loongarch/kernel/vdso.c    | 1 -
 arch/mips/kernel/vdso.c         | 1 -
 arch/riscv/kernel/sys_hwprobe.c | 1 -
 arch/riscv/kernel/vdso.c        | 1 -
 arch/s390/kernel/time.c         | 1 -
 lib/vdso/getrandom.c            | 3 ---
 lib/vdso/gettimeofday.c         | 3 ---
 9 files changed, 13 deletions(-)

diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index e306d0c5a21c..7be871f5eb9e 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -23,7 +23,6 @@
 #include <asm/vdso.h>
 #include <clocksource/arm_arch_timer.h>
 #include <vdso/helpers.h>
-#include <vdso/vsyscall.h>
 
 #define MAX_SYMNAME	64
 
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 592dd8668de4..50596dab23f9 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -22,7 +22,6 @@
 #include <linux/vmalloc.h>
 #include <vdso/datapage.h>
 #include <vdso/helpers.h>
-#include <vdso/vsyscall.h>
 
 #include <asm/cacheflush.h>
 #include <asm/signal32.h>
diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c
index 8ce8159c10b9..1edc8fb720de 100644
--- a/arch/loongarch/kernel/vdso.c
+++ b/arch/loongarch/kernel/vdso.c
@@ -20,7 +20,6 @@
 #include <asm/vdso.h>
 #include <asm/vdso/vdso.h>
 #include <vdso/helpers.h>
-#include <vdso/vsyscall.h>
 #include <vdso/datapage.h>
 #include <generated/vdso-offsets.h>
 
diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c
index 8165dd3fc1f8..8eb1760a8a9b 100644
--- a/arch/mips/kernel/vdso.c
+++ b/arch/mips/kernel/vdso.c
@@ -23,7 +23,6 @@
 #include <asm/vdso.h>
 #include <asm/vdso/vdso.h>
 #include <vdso/helpers.h>
-#include <vdso/vsyscall.h>
 
 static_assert(VDSO_NR_PAGES == __VDSO_PAGES);
 
diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c
index 0f42101ad935..e1ad8671137d 100644
--- a/arch/riscv/kernel/sys_hwprobe.c
+++ b/arch/riscv/kernel/sys_hwprobe.c
@@ -19,7 +19,6 @@
 #include <asm/vendor_extensions/sifive_hwprobe.h>
 #include <asm/vendor_extensions/thead_hwprobe.h>
 #include <vdso/datapage.h>
-#include <vdso/vsyscall.h>
 
 
 #define EXT_KEY(isa_arg, ext, pv, missing)					\
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
index 9c2f5e442338..5666cec180ac 100644
--- a/arch/riscv/kernel/vdso.c
+++ b/arch/riscv/kernel/vdso.c
@@ -15,7 +15,6 @@
 #include <asm/vdso.h>
 #include <linux/vdso_datastore.h>
 #include <vdso/datapage.h>
-#include <vdso/vsyscall.h>
 
 #define VVAR_SIZE  (VDSO_NR_PAGES << PAGE_SHIFT)
 
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 161628f6906f..bca65bf1c8cb 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -40,7 +40,6 @@
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
 #include <linux/vdso_time.h>
-#include <vdso/vsyscall.h>
 #include <vdso/clocksource.h>
 #include <vdso/helpers.h>
 #include <asm/facility.h>
diff --git a/lib/vdso/getrandom.c b/lib/vdso/getrandom.c
index 6ff46549281c..e0fa10bbefc9 100644
--- a/lib/vdso/getrandom.c
+++ b/lib/vdso/getrandom.c
@@ -16,9 +16,6 @@
 #include <uapi/linux/mman.h>
 #include <uapi/linux/random.h>
 
-/* 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)
 {
diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index b867c2301d5c..728fed1ae52f 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -27,9 +27,6 @@
 
 #include <linux/build_bug.h>
 
-/* Bring in default accessors */
-#include <vdso/vsyscall.h>
-
 #ifndef vdso_calc_ns
 
 #ifdef VDSO_DELTA_NOMASK

-- 
2.55.0


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

* [PATCH 14/15] vdso: Add asm-generic/vdso/vsyscall.h
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (12 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 13/15] vdso: Remove unnecessary vdso/vsyscall.h includes Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:04   ` sashiko-bot
  2026-09-09  8:51 ` [PATCH 15/15] vdso: Remove __ASSEMBLER__ guards from vsyscall.h Thomas Weißschuh
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

Most architectures' asm/vdso/vsyscall.h do not define any symbols.

Add an empty asm-generic variant and replace the pointless
architecture-specific copies.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/loongarch/include/asm/vdso/vsyscall.h | 11 -----------
 arch/mips/include/asm/vdso/vsyscall.h      | 13 -------------
 arch/powerpc/include/asm/vdso/vsyscall.h   | 11 -----------
 arch/riscv/include/asm/vdso/vsyscall.h     | 11 -----------
 arch/s390/include/asm/vdso/vsyscall.h      | 13 -------------
 arch/sparc/include/asm/vdso/vsyscall.h     |  6 ------
 arch/x86/include/asm/vdso/vsyscall.h       | 12 ------------
 include/asm-generic/Kbuild                 |  1 +
 include/asm-generic/vdso/vsyscall.h        |  0
 9 files changed, 1 insertion(+), 77 deletions(-)

diff --git a/arch/loongarch/include/asm/vdso/vsyscall.h b/arch/loongarch/include/asm/vdso/vsyscall.h
deleted file mode 100644
index db653780519d..000000000000
--- a/arch/loongarch/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_VDSO_VSYSCALL_H
-#define __ASM_VDSO_VSYSCALL_H
-
-#ifndef __ASSEMBLER__
-
-#include <vdso/datapage.h>
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/mips/include/asm/vdso/vsyscall.h b/arch/mips/include/asm/vdso/vsyscall.h
deleted file mode 100644
index f01ab2e15c08..000000000000
--- a/arch/mips/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_VDSO_VSYSCALL_H
-#define __ASM_VDSO_VSYSCALL_H
-
-#include <asm/page.h>
-
-#ifndef __ASSEMBLER__
-
-#include <vdso/datapage.h>
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/powerpc/include/asm/vdso/vsyscall.h b/arch/powerpc/include/asm/vdso/vsyscall.h
deleted file mode 100644
index 6a6510fa8217..000000000000
--- a/arch/powerpc/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_POWERPC_VDSO_VSYSCALL_H
-#define _ASM_POWERPC_VDSO_VSYSCALL_H
-
-#ifndef __ASSEMBLER__
-
-#include <asm/vdso_datapage.h>
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* _ASM_POWERPC_VDSO_VSYSCALL_H */
diff --git a/arch/riscv/include/asm/vdso/vsyscall.h b/arch/riscv/include/asm/vdso/vsyscall.h
deleted file mode 100644
index db653780519d..000000000000
--- a/arch/riscv/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_VDSO_VSYSCALL_H
-#define __ASM_VDSO_VSYSCALL_H
-
-#ifndef __ASSEMBLER__
-
-#include <vdso/datapage.h>
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/s390/include/asm/vdso/vsyscall.h b/arch/s390/include/asm/vdso/vsyscall.h
deleted file mode 100644
index c74c307c320c..000000000000
--- a/arch/s390/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_VDSO_VSYSCALL_H
-#define __ASM_VDSO_VSYSCALL_H
-
-#ifndef __ASSEMBLER__
-
-#include <linux/hrtimer.h>
-#include <vdso/datapage.h>
-#include <asm/vdso.h>
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/sparc/include/asm/vdso/vsyscall.h b/arch/sparc/include/asm/vdso/vsyscall.h
deleted file mode 100644
index ff62b291e4eb..000000000000
--- a/arch/sparc/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef _ASM_SPARC_VDSO_VSYSCALL_H
-#define _ASM_SPARC_VDSO_VSYSCALL_H
-
-#endif /* _ASM_SPARC_VDSO_VSYSCALL_H */
diff --git a/arch/x86/include/asm/vdso/vsyscall.h b/arch/x86/include/asm/vdso/vsyscall.h
deleted file mode 100644
index 65d10f4cc718..000000000000
--- a/arch/x86/include/asm/vdso/vsyscall.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_VDSO_VSYSCALL_H
-#define __ASM_VDSO_VSYSCALL_H
-
-#ifndef __ASSEMBLER__
-
-#include <vdso/datapage.h>
-#include <asm/vgtod.h>
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
index 2bc00c67dc54..b7a388bef6ea 100644
--- a/include/asm-generic/Kbuild
+++ b/include/asm-generic/Kbuild
@@ -63,6 +63,7 @@ mandatory-y += trace_clock.h
 mandatory-y += uaccess.h
 mandatory-y += unwind_user.h
 mandatory-y += vdso/clocksource.h
+mandatory-y += vdso/vsyscall.h
 mandatory-y += vermagic.h
 mandatory-y += vga.h
 mandatory-y += video.h
diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
new file mode 100644
index 000000000000..e69de29bb2d1

-- 
2.55.0


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

* [PATCH 15/15] vdso: Remove __ASSEMBLER__ guards from vsyscall.h
  2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
                   ` (13 preceding siblings ...)
  2026-09-09  8:51 ` [PATCH 14/15] vdso: Add asm-generic/vdso/vsyscall.h Thomas Weißschuh
@ 2026-09-09  8:51 ` Thomas Weißschuh
  2026-09-09  9:00   ` sashiko-bot
  14 siblings, 1 reply; 31+ messages in thread
From: Thomas Weißschuh @ 2026-09-09  8:51 UTC (permalink / raw)
  To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino
  Cc: linux-kernel, linux-s390, linux-arch, linux-arm-kernel, loongarch,
	linux-mips, linuxppc-dev, linux-riscv, sparclinux,
	Thomas Weißschuh

These headers are only used from regular C code.

Remove the unnecessary guards.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 arch/arm/include/asm/vdso/vsyscall.h   | 4 ----
 arch/arm64/include/asm/vdso/vsyscall.h | 4 ----
 include/vdso/vsyscall.h                | 4 ----
 3 files changed, 12 deletions(-)

diff --git a/arch/arm/include/asm/vdso/vsyscall.h b/arch/arm/include/asm/vdso/vsyscall.h
index 14f2ea9d8640..b97dda100e52 100644
--- a/arch/arm/include/asm/vdso/vsyscall.h
+++ b/arch/arm/include/asm/vdso/vsyscall.h
@@ -2,8 +2,6 @@
 #ifndef __ASM_VDSO_VSYSCALL_H
 #define __ASM_VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLY__
-
 #include <vdso/datapage.h>
 #include <asm/cacheflush.h>
 
@@ -14,6 +12,4 @@ void __arch_sync_vdso_time_data(struct vdso_time_data *vdata)
 }
 #define __arch_sync_vdso_time_data __arch_sync_vdso_time_data
 
-#endif /* !__ASSEMBLY__ */
-
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/arch/arm64/include/asm/vdso/vsyscall.h b/arch/arm64/include/asm/vdso/vsyscall.h
index 7d9d6bdd58b2..7c46c37fd36f 100644
--- a/arch/arm64/include/asm/vdso/vsyscall.h
+++ b/arch/arm64/include/asm/vdso/vsyscall.h
@@ -2,8 +2,6 @@
 #ifndef __ASM_VDSO_VSYSCALL_H
 #define __ASM_VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLER__
-
 #include <vdso/datapage.h>
 
 #define VDSO_PRECISION_MASK	~(0xFF00ULL<<48)
@@ -19,6 +17,4 @@ void __arch_update_vdso_clock(struct vdso_clock *vc)
 }
 #define __arch_update_vdso_clock __arch_update_vdso_clock
 
-#endif /* !__ASSEMBLER__ */
-
 #endif /* __ASM_VDSO_VSYSCALL_H */
diff --git a/include/vdso/vsyscall.h b/include/vdso/vsyscall.h
index 29dd4e097220..af62bbf04eac 100644
--- a/include/vdso/vsyscall.h
+++ b/include/vdso/vsyscall.h
@@ -2,10 +2,6 @@
 #ifndef __VDSO_VSYSCALL_H
 #define __VDSO_VSYSCALL_H
 
-#ifndef __ASSEMBLER__
-
 #include <asm/vdso/vsyscall.h>
 
-#endif /* !__ASSEMBLER__ */
-
 #endif /* __VDSO_VSYSCALL_H */

-- 
2.55.0


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

* Re: [PATCH 03/15] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c
  2026-09-09  8:51 ` [PATCH 03/15] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c Thomas Weißschuh
@ 2026-09-09  8:54   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:54 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Christian Borntraeger, linux-s390, Vasily Gorbik, Heiko Carstens,
	Alexander Gordeev

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

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=3


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

* Re: [PATCH 05/15] vdso: Delete asm-generic/vdso/vsyscall.h
  2026-09-09  8:51 ` [PATCH 05/15] vdso: Delete asm-generic/vdso/vsyscall.h Thomas Weißschuh
@ 2026-09-09  8:54   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:54 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Vasily Gorbik, Heiko Carstens, Christian Borntraeger, linux-s390,
	Alexander Gordeev

> Recent refactoring have made the header empty.
> 
> Remove it and its mentions.
> 
> Also that header was never a real asm-generic header anyways.
> It had no reason to be in the asm-generic directory.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=5


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

* Re: [PATCH 12/15] riscv/hwprobe: Include vdso/datapage.h
  2026-09-09  8:51 ` [PATCH 12/15] riscv/hwprobe: Include vdso/datapage.h Thomas Weißschuh
@ 2026-09-09  8:55   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:55 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Heiko Carstens, Alexander Gordeev, linux-s390, Vasily Gorbik,
	Christian Borntraeger

> The symbol vdso_k_arch_data is provided by vdso/datapage.h,
> which is currently not included explicitly. An upcoming refactoring will
> remove the currently used transitive inclusion.
> 
> Add an explicit inclusion.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=12


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

* Re: [PATCH 09/15] sparc/vdso: Delete asm/vdso/vsyscall.h inclusion
  2026-09-09  8:51 ` [PATCH 09/15] sparc/vdso: Delete asm/vdso/vsyscall.h inclusion Thomas Weißschuh
@ 2026-09-09  8:55   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:55 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Vasily Gorbik, Christian Borntraeger, linux-s390,
	Alexander Gordeev, Heiko Carstens

> The inclusion is unnecessary, remove it.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=9


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

* Re: [PATCH 11/15] arm64/vdso: Delete asm/vdso/vsyscall.h inclusions
  2026-09-09  8:51 ` [PATCH 11/15] arm64/vdso: " Thomas Weißschuh
@ 2026-09-09  8:56   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:56 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Vasily Gorbik, Christian Borntraeger, linux-s390,
	Alexander Gordeev, Heiko Carstens

> The inclusions are unnecessary, remove them.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=11


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

* Re: [PATCH 08/15] s390/vdso: Delete asm/vdso/vsyscall.h inclusions
  2026-09-09  8:51 ` [PATCH 08/15] s390/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
@ 2026-09-09  8:56   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:56 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: linux-s390, Christian Borntraeger, Vasily Gorbik,
	Alexander Gordeev, Heiko Carstens

> The inclusions are unnecessary, remove them.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=8


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

* Re: [PATCH 02/15] vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c
  2026-09-09  8:51 ` [PATCH 02/15] vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c Thomas Weißschuh
@ 2026-09-09  8:57   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  8:57 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Alexander Gordeev, Christian Borntraeger, Vasily Gorbik,
	linux-s390, Heiko Carstens

> __arch_get_vdso_u_time_data() is only used in gettimeofday.c. vsyscall.h
> has become a dumping ground for different kinds of fallbacks.
> 
> Move the fallback function definition into gettimeofday.c,
> similar to other fallbacks.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=2


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

* Re: [PATCH 15/15] vdso: Remove __ASSEMBLER__ guards from vsyscall.h
  2026-09-09  8:51 ` [PATCH 15/15] vdso: Remove __ASSEMBLER__ guards from vsyscall.h Thomas Weißschuh
@ 2026-09-09  9:00   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:00 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, linux-s390

> These headers are only used from regular C code.
> 
> Remove the unnecessary guards.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=15


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

* Re: [PATCH 06/15] x86/vdso: Move vDSO page definitions to asm/vdso.h
  2026-09-09  8:51 ` [PATCH 06/15] x86/vdso: Move vDSO page definitions to asm/vdso.h Thomas Weißschuh
@ 2026-09-09  9:00   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:00 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Alexander Gordeev, Vasily Gorbik, Heiko Carstens, linux-s390,
	Christian Borntraeger

> Most architectures define the vDSO page macros in asm/vdso.h.
> 
> Align the x86 headers.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=6


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

* Re: [PATCH 07/15] sparc/vdso: Move __VDSO_PAGES to asm/vdso.h
  2026-09-09  8:51 ` [PATCH 07/15] sparc/vdso: Move __VDSO_PAGES " Thomas Weißschuh
@ 2026-09-09  9:01   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:01 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: linux-s390, Vasily Gorbik, Christian Borntraeger,
	Alexander Gordeev, Heiko Carstens

> Most architectures define the __VDSO_PAGES page macro in asm/vdso.h.
> 
> Align the SPARC headers.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=7


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

* Re: [PATCH 13/15] vdso: Remove unnecessary vdso/vsyscall.h includes
  2026-09-09  8:51 ` [PATCH 13/15] vdso: Remove unnecessary vdso/vsyscall.h includes Thomas Weißschuh
@ 2026-09-09  9:01   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:01 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Christian Borntraeger, Alexander Gordeev, linux-s390,
	Heiko Carstens, Vasily Gorbik

> None of these files uses anything from the header.
> 
> Remove the inclusion.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=13


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

* Re: [PATCH 10/15] x86/vdso: Delete asm/vdso/vsyscall.h inclusions
  2026-09-09  8:51 ` [PATCH 10/15] x86/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
@ 2026-09-09  9:02   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:02 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Vasily Gorbik, linux-s390, Alexander Gordeev,
	Christian Borntraeger, Heiko Carstens

> The inclusions are unnecessary, remove them.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=10


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

* Re: [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header
  2026-09-09  8:51 ` [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header Thomas Weißschuh
@ 2026-09-09  9:03   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:03 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 2 potential issue(s) to consider:

New issues:
- [Low] The kerneldoc for `vdso_time_update_begin()` still references the old function name `vdso_update_end()` instead of `vdso_time_update_end()`.

Pre-existing issues:
- [High] kvm_clock_sync() accesses KVM's vm_list locklessly during stop_machine(), which can race with VM creation/destruction and traverse a corrupted list.
--

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

vdso: Move the kernel-side time update helpers to a new header

The vdso/ header namespace is meant for symbols which are usable from
vDSO userspace code. However vdso_update_begin() and vdso_update_end()
are only usable from the kernel. Move them into a new header in the
linux/ namespace. Also rename them to make clear that they are only
for time-related data.

> diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
> index 2b989bebd220a..161628f6906fe 100644
> --- a/arch/s390/kernel/time.c
> +++ b/arch/s390/kernel/time.c
> @@ -527,7 +528,7 @@ static int stp_sync_clock(void *data)
>  			cpu_relax();
>  		rc = 0;
>  		if (stp_info.todoff || stp_info.tmd != 2) {
> -			flags = vdso_update_begin();
> +			flags = vdso_time_update_begin();
>  			rc = chsc_sstpc(stp_page, STP_OP_SYNC, 0,
>  					&clock_delta);
>  			if (rc == 0) {
>  				sync->clock_delta = clock_delta;
>  				clock_sync_global(clock_delta);

[Severity: High]
This isn't a bug introduced by this patch, but is a pre-existing severe
issue. Does stp_sync_clock() running via stop_machine() race with VM
creation or destruction and lead to list corruption?

If a task is preempted while modifying vm_list under kvm_lock during VM
creation or destruction (since kvm_lock is a mutex and leaves preemption
enabled), the list pointers could be left in an inconsistent state.

Because stp_sync_clock() runs via stop_machine(), it can preempt such tasks.
stp_sync_clock() calls clock_sync_global(), which triggers the epoch notifier
and causes kvm_clock_sync() to blindly traverse the corrupted vm_list
locklessly:

arch/s390/kvm/s390.c:kvm_clock_sync() {
    ...
    list_for_each_entry(kvm, &vm_list, vm_list) {
    ...
}

Can this lead to a host kernel panic or an infinite loop during lockless
traversal?

>  				rc = __store_stpinfo();
>  				if (rc == 0 && stp_info.tmd != 2)
>  					rc = -EAGAIN;
>  			}
> -			vdso_update_end(flags);
> +			vdso_time_update_end(flags);
>  		}
>  		sync->in_sync = rc ? -EAGAIN : 1;
>  		xchg(&first, 0);

[ ... ]

> diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c
> index aa59919b8f2c2..12e205d86e7f3 100644
> --- a/kernel/time/vsyscall.c
> +++ b/kernel/time/vsyscall.c
> @@ -177,7 +178,7 @@ void vdso_time_update_aux(struct timekeeper *tk)
>  #endif
>  
>  /**
> - * vdso_update_begin - Start of a VDSO update section
> + * vdso_time_update_begin - Start of a VDSO update section
>   *
>   * Allows architecture code to safely update the architecture specific VDSO
>   * data. Disables interrupts, acquires timekeeper lock to serialize against
> @@ -188,7 +189,7 @@ void vdso_time_update_aux(struct timekeeper *tk)
>   * Returns: Saved interrupt flags which need to be handed in to
>   * vdso_update_end().
     ^^^^^^^^^^^^^^^
>   */
> -unsigned long vdso_update_begin(void)
> +unsigned long vdso_time_update_begin(void)

[Severity: Low]
Should the kerneldoc for vdso_time_update_begin() be updated to reference
vdso_time_update_end() instead of vdso_update_end()?

>  {
>  	struct vdso_time_data *vdata = vdso_k_time_data;
>  	unsigned long flags = timekeeper_lock_irqsave();

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=1

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

* Re: [PATCH 14/15] vdso: Add asm-generic/vdso/vsyscall.h
  2026-09-09  8:51 ` [PATCH 14/15] vdso: Add asm-generic/vdso/vsyscall.h Thomas Weißschuh
@ 2026-09-09  9:04   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:04 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Christian Borntraeger, linux-s390, Heiko Carstens,
	Alexander Gordeev, Vasily Gorbik

> Most architectures' asm/vdso/vsyscall.h do not define any symbols.
> 
> Add an empty asm-generic variant and replace the pointless
> architecture-specific copies.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=14


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

* Re: [PATCH 04/15] vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c
  2026-09-09  8:51 ` [PATCH 04/15] vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c Thomas Weißschuh
@ 2026-09-09  9:13   ` sashiko-bot
  0 siblings, 0 replies; 31+ messages in thread
From: sashiko-bot @ 2026-09-09  9:13 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: linux-s390, Alexander Gordeev, Vasily Gorbik, Heiko Carstens,
	Christian Borntraeger

> __arch_update_vdso_clock() and __arch_sync_vdso_time_data() are only
> used in vsyscall.c. vsyscall.h has become a dumping ground for different
> kinds of fallbacks.
> 
> Move the fallback function definitions into vsyscall.c.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-vdso-asm-generic-vsyscall-h-v1-0-63ae856cc659@linutronix.de?part=4


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

end of thread, other threads:[~2026-09-09  9:13 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09  8:51 [PATCH 00/15] vdso: Clean up the vsyscall.h headers Thomas Weißschuh
2026-09-09  8:51 ` [PATCH 01/15] vdso: Move the kernel-side time update helpers to a new header Thomas Weißschuh
2026-09-09  9:03   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 02/15] vdso/gettimeofday: Define fallback __arch_get_vdso_u_time_data() in gettimeofday.c Thomas Weißschuh
2026-09-09  8:57   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 03/15] vdso/getrandom: Define fallback __arch_get_vdso_u_rng_data() in getrandom.c Thomas Weißschuh
2026-09-09  8:54   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 04/15] vdso/vsyscall: Define fallback time synchronization functions in vsyscall.c Thomas Weißschuh
2026-09-09  9:13   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 05/15] vdso: Delete asm-generic/vdso/vsyscall.h Thomas Weißschuh
2026-09-09  8:54   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 06/15] x86/vdso: Move vDSO page definitions to asm/vdso.h Thomas Weißschuh
2026-09-09  9:00   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 07/15] sparc/vdso: Move __VDSO_PAGES " Thomas Weißschuh
2026-09-09  9:01   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 08/15] s390/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
2026-09-09  8:56   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 09/15] sparc/vdso: Delete asm/vdso/vsyscall.h inclusion Thomas Weißschuh
2026-09-09  8:55   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 10/15] x86/vdso: Delete asm/vdso/vsyscall.h inclusions Thomas Weißschuh
2026-09-09  9:02   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 11/15] arm64/vdso: " Thomas Weißschuh
2026-09-09  8:56   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 12/15] riscv/hwprobe: Include vdso/datapage.h Thomas Weißschuh
2026-09-09  8:55   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 13/15] vdso: Remove unnecessary vdso/vsyscall.h includes Thomas Weißschuh
2026-09-09  9:01   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 14/15] vdso: Add asm-generic/vdso/vsyscall.h Thomas Weißschuh
2026-09-09  9:04   ` sashiko-bot
2026-09-09  8:51 ` [PATCH 15/15] vdso: Remove __ASSEMBLER__ guards from vsyscall.h Thomas Weißschuh
2026-09-09  9:00   ` sashiko-bot

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