Commit cca5efe7 authored by Kees Cook's avatar Kees Cook Committed by Huacai Chen

LoongArch: vDSO: Disable UBSAN instrumentation

The vDSO executes in userspace, so the kernel's UBSAN should not
instrument it. Solves these kind of build errors:

  loongarch64-linux-ld: arch/loongarch/vdso/vgettimeofday.o: in function `vdso_shift_ns':
  lib/vdso/gettimeofday.c:23:(.text+0x3f8): undefined reference to `__ubsan_handle_shift_out_of_bounds'
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401310530.lZHCj1Zl-lkp@intel.com/
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Fangrui Song <maskray@google.com>
Cc: loongarch@lists.linux.dev
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 639420e9
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Objects to go into the VDSO. # Objects to go into the VDSO.
KASAN_SANITIZE := n KASAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n KCOV_INSTRUMENT := n
# Include the generic Makefile to check the built vdso. # Include the generic Makefile to check the built vdso.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment