public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc: vdso: Disable UBSAN instrumentation
@ 2024-02-23 16:59 Kees Cook
  2024-02-23 18:26 ` Sam Ravnborg
  2024-02-29 20:00 ` Andy Shevchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Kees Cook @ 2024-02-23 16:59 UTC (permalink / raw)
  To: David S. Miller
  Cc: Kees Cook, Andreas Larsson, Masahiro Yamada, Sam Ravnborg,
	Helge Deller, Guo Ren, sparclinux, Catalin Marinas,
	Russell King (Oracle), linux-kernel, linux-hardening

The UBSAN instrumentation cannot work in the vDSO since it is executing
in userspace, so disable it in the Makefile. Fixes the build failures
such as:

arch/sparc/vdso/vclock_gettime.c:217: undefined reference to `__ubsan_handle_shift_out_of_bounds'

Signed-off-by: Kees Cook <keescook@chromium.org>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Guo Ren <guoren@kernel.org>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/vdso/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index 7f5eedf1f5e0..e8aef2c8ae99 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -2,6 +2,7 @@
 #
 # Building vDSO images for sparc.
 #
+UBSAN_SANITIZE := n
 
 # files to link into the vdso
 vobjs-y := vdso-note.o vclock_gettime.o
-- 
2.34.1


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

end of thread, other threads:[~2024-02-29 21:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23 16:59 [PATCH] sparc: vdso: Disable UBSAN instrumentation Kees Cook
2024-02-23 18:26 ` Sam Ravnborg
2024-02-23 23:32   ` Kees Cook
2024-02-24  7:36     ` Sam Ravnborg
2024-02-29 20:00 ` Andy Shevchenko
2024-02-29 21:32   ` Kees Cook

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