public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] vDSO: Use 32-bit CHECKFLAGS for compat vDSO
@ 2026-03-02  7:58 Thomas Weißschuh
  2026-03-02  7:58 ` [PATCH v2 1/5] x86/vdso: " Thomas Weißschuh
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Thomas Weißschuh @ 2026-03-02  7:58 UTC (permalink / raw)
  To: David S. Miller, Andreas Larsson, Andy Lutomirski,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Arnd Bergmann, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
	Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy (CS GROUP)
  Cc: sparclinux, linux-kernel, linux-arch, linux-s390, David Laight,
	linuxppc-dev, Thomas Weißschuh, Sun Jian, kernel test robot,
	Dan Carpenter

When building the compat vDSO the CHECKFLAGS from the 64-bit kernel
are used. These are combined with the 32-bit CFLAGS. This confuses
sparse, producing false-positive warnings or potentially missing
real issues.

Manually override the CHECKFLAGS for the compat vDSO with the correct
32-bit configuration.

Not all architectures are supported, as many do not use sparse for their
(compat) vDSO. These can be enabled later.

Also add some checks to bitsperlong.h to detect such issues earlier.

Based on tip/timers/vdso.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Simplify __BITS_PER_LONG consistency checks
- Fix an inconsistency in the powerpc audit code
- Move check to kernel headers instead of UAPI ones
- Use KBUILD_CPPFLAGS = -m64 on s390 instead,
  the previous include trimming turned out to require changes to many more files
- Rebase on v7.0-rc1
- Link to v1: https://lore.kernel.org/r/20260116-vdso-compat-checkflags-v1-0-4a83b4fbb0d3@linutronix.de

---
Thomas Weißschuh (5):
      x86/vdso: Use 32-bit CHECKFLAGS for compat vDSO
      sparc64: vdso: Use 32-bit CHECKFLAGS for compat vDSO
      s390: Add -m64 to KBUILD_CPPFLAGS
      powerpc/audit: directly include unistd_32.h from compat_audit.c
      asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG

 arch/powerpc/kernel/compat_audit.c  | 3 +--
 arch/s390/Makefile                  | 3 +--
 arch/sparc/vdso/Makefile            | 3 +++
 arch/x86/entry/vdso/vdso32/Makefile | 4 ++++
 include/asm-generic/bitsperlong.h   | 9 +++++++++
 5 files changed, 18 insertions(+), 4 deletions(-)
---
base-commit: 740f1913cfa0d48222760eaa438c509ca9fc3710
change-id: 20251107-vdso-compat-checkflags-5db75b3b4bac

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


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

end of thread, other threads:[~2026-03-06 13:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02  7:58 [PATCH v2 0/5] vDSO: Use 32-bit CHECKFLAGS for compat vDSO Thomas Weißschuh
2026-03-02  7:58 ` [PATCH v2 1/5] x86/vdso: " Thomas Weißschuh
2026-03-02  7:58 ` [PATCH v2 2/5] sparc64: vdso: " Thomas Weißschuh
2026-03-02  7:58 ` [PATCH v2 3/5] s390: Add -m64 to KBUILD_CPPFLAGS Thomas Weißschuh
2026-03-02  8:42   ` Arnd Bergmann
2026-03-02  7:58 ` [PATCH v2 4/5] powerpc/audit: directly include unistd_32.h from compat_audit.c Thomas Weißschuh
2026-03-02  8:41   ` Arnd Bergmann
2026-03-02  7:58 ` [PATCH v2 5/5] asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG Thomas Weißschuh
2026-03-06 10:43 ` [PATCH v2 0/5] vDSO: Use 32-bit CHECKFLAGS for compat vDSO Christophe Leroy (CS GROUP)
2026-03-06 13:08   ` Thomas Weißschuh
2026-03-06 13:26     ` Christophe Leroy (CS GROUP)

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