Skip to content

Commit fc4cac4

Browse files
solbjorntsbogend
authored andcommitted
MIPS: compressed: fix build with enabled UBSAN
Commit 1e35918 ("MIPS: Enable Undefined Behavior Sanitizer UBSAN") added a possibility to build the entire kernel with UBSAN instrumentation for MIPS, with the exception for VDSO. However, self-extracting head wasn't been added to exceptions, so this occurs: mips-alpine-linux-musl-ld: arch/mips/boot/compressed/decompress.o: in function `FSE_buildDTable_wksp': decompress.c:(.text.FSE_buildDTable_wksp+0x278): undefined reference to `__ubsan_handle_shift_out_of_bounds' mips-alpine-linux-musl-ld: decompress.c:(.text.FSE_buildDTable_wksp+0x2a8): undefined reference to `__ubsan_handle_shift_out_of_bounds' mips-alpine-linux-musl-ld: decompress.c:(.text.FSE_buildDTable_wksp+0x2c4): undefined reference to `__ubsan_handle_shift_out_of_bounds' mips-alpine-linux-musl-ld: arch/mips/boot/compressed/decompress.o: decompress.c:(.text.FSE_buildDTable_raw+0x9c): more undefined references to `__ubsan_handle_shift_out_of_bounds' follow Add UBSAN_SANITIZE := n to mips/boot/compressed/Makefile to exclude it from instrumentation scope and fix this issue. Fixes: 1e35918 ("MIPS: Enable Undefined Behavior Sanitizer UBSAN") Cc: [email protected] # 5.0+ Signed-off-by: Alexander Lobakin <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 457d2fc commit fc4cac4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/mips/boot/compressed/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
3737
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
3838
KCOV_INSTRUMENT := n
3939
GCOV_PROFILE := n
40+
UBSAN_SANITIZE := n
4041

4142
# decompressor objects (linked with vmlinuz)
4243
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o

0 commit comments

Comments
 (0)