-fsanitize=[kernel-]address-sanitizer allows compile-time instrumentation of memory accesses to detect some classes of runtime undefined behavior. In preparation for allowing arches to provide infrastructure in support of this feature, add the generic KASAN options. These are only shown in the debug menu when the arch selects the appropriate symbol. The option is named equally to their Linux counterparts. Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx> --- common/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 16a2aef7c568..cafaadb3d46f 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1297,6 +1297,13 @@ config PBL_BREAK source "lib/Kconfig.ubsan" +config KASAN + bool "KASAN: runtime memory debugger" + depends on HAVE_ARCH_KASAN + help + Enables KASAN (KernelAddressSANitizer) - runtime memory debugger, + designed to find out-of-bounds accesses and use-after-free bugs. + endmenu config HAS_DEBUG_LL @@ -1305,3 +1312,6 @@ config HAS_DEBUG_LL config DDR_SPD bool select CRC_ITU_T + +config HAVE_ARCH_KASAN + bool -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox