summaryrefslogtreecommitdiff
path: root/src/Kconfig
diff options
context:
space:
mode:
authorHarshit Sharma <harshitsharmajs@gmail.com>2020-06-09 20:25:16 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-08-21 07:35:07 +0000
commit2bcaba0fd4f61493a02f11ad01d0677164e2e86e (patch)
tree8e9a40326efc6917611e99e79874fd536060d54a /src/Kconfig
parent693f4a417984849cdb68d176ca162f477275ac3f (diff)
lib: Add ASan stub
Add a Kconfig option to enable address sanitizer on x86 architecture. Create ASan dummy functions. And add relevant gcc flags to compile ramstage with ASan. Change-Id: I6d87e48b6786f02dd46ea74e702f294082fd8891 Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42271 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/Kconfig')
-rw-r--r--src/Kconfig13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Kconfig b/src/Kconfig
index a4c2fa6010..1540c567e4 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -270,6 +270,19 @@ config UBSAN
say N because it adds a small performance penalty and may abort
on code that happens to work in spite of the UB.
+config ASAN_IN_RAMSTAGE
+ bool "Address sanitizer support"
+ depends on ARCH_X86
+ default n
+ help
+ Enable address sanitizer - runtime memory debugger,
+ designed to find out-of-bounds accesses and use-after-scope bugs.
+
+ This feature consumes up to 1/8 of available memory and brings about
+ ~1.5x performance slowdown.
+
+ If unsure, say N.
+
choice
prompt "Stage Cache for ACPI S3 resume"
default NO_STAGE_CACHE if !HAVE_ACPI_RESUME