[PATCH 1/5] lib: ubsan: disable sanitization for UBSAN implementation
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Oct 9 04:52:35 PDT 2023
As done in Linux, the implementation of ubsan itself should not be
instrumented by KASAN and stack protector.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
lib/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/Makefile b/lib/Makefile
index 2b577becc444..791080b2d158 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -89,6 +89,8 @@ obj-$(CONFIG_GENERIC_LIB_MULDI3) += muldi3.o
pbl-$(CONFIG_GENERIC_LIB_ASHLDI3) += ashldi3.o
UBSAN_SANITIZE_ubsan.o := n
+KASAN_SANITIZE_ubsan.o := n
+CFLAGS_ubsan.o := -fno-stack-protector
libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \
fdt_empty_tree.o
--
2.39.2
More information about the barebox
mailing list