linux/arch/mips/boot/compressed
Alexander Lobakin fc4cac4cfc MIPS: compressed: fix build with enabled UBSAN
Commit 1e35918ad9 ("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: 1e35918ad9 ("MIPS: Enable Undefined Behavior Sanitizer UBSAN")
Cc: stable@vger.kernel.org # 5.0+
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2021-02-09 11:15:16 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
calc_vmlinuz_load_addr.c MIPS: fix build on non-linux hosts 2019-06-19 15:55:53 -07:00
dbg.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
decompress.c MIPS: Add support for ZSTD-compressed kernels 2020-09-03 10:13:24 +02:00
dummy.c MIPS: Add support for GZIP / BZIP2 / LZMA compressed kernel images 2009-12-17 01:56:56 +00:00
head.S MIPS: zboot: Avoid endless loop in clear BSS. 2021-01-07 17:12:14 +01:00
ld.script MIPS: zboot: put appended dtb into a section 2020-11-06 11:28:16 +01:00
Makefile MIPS: compressed: fix build with enabled UBSAN 2021-02-09 11:15:16 +01:00
string.c MIPS: Add support for ZSTD-compressed kernels 2020-09-03 10:13:24 +02:00
uart-16550.c MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4770 2018-05-14 23:54:25 +01:00
uart-alchemy.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uart-prom.c mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00