diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2019-08-27 17:09:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-09 15:16:08 +0200 |
commit | 9bc174167070d358f126631ad407050767a12792 (patch) | |
tree | 565159719dd831d28337fa1def337b6c37e98c4d /common/Kconfig | |
parent | 919d4a4ace1cd10ae5aabd811f7a0c6b8a98923b (diff) | |
download | barebox-9bc174167070d358f126631ad407050767a12792.tar.gz barebox-9bc174167070d358f126631ad407050767a12792.tar.xz |
common: add generic CONFIG_KASAN option
-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@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Kconfig')
-rw-r--r-- | common/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig index 16a2aef7c5..cafaadb3d4 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 |