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 <keesc...@chromium.org>
---
Cc: "David S. Miller" <da...@davemloft.net>
Cc: Andreas Larsson <andr...@gaisler.com>
Cc: Masahiro Yamada <masahi...@kernel.org>
Cc: Sam Ravnborg <s...@ravnborg.org>
Cc: Helge Deller <del...@gmx.de>
Cc: Guo Ren <guo...@kernel.org>
Cc: sparcli...@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


Reply via email to