lib: Update ASan compiler flags and Kconfig help text
An additional compiler flag is added to make use of the shadow offset callback feature we introduced in our GCC patch. Also, a comment is added to tell user that this GCC patch needs to be applied in order to use ASan. Change-Id: Ia187e4991bf808f4ae137eff0ffdb9baea0085e9 Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43164 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
This commit is contained in:
committed by
Patrick Georgi
parent
2bcaba0fd4
commit
3b9cc859ff
@@ -9,7 +9,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_ASAN_IN_RAMSTAGE),y)
|
||||
ramstage-y += asan.c
|
||||
CFLAGS_asan += -fsanitize=kernel-address \
|
||||
# Ensure that asan_shadow_offset_callback patch is applied to GCC before ASan is used.
|
||||
CFLAGS_asan += -fsanitize=kernel-address --param asan-use-shadow-offset-callback=1 \
|
||||
--param asan-stack=1 --param asan-globals=1 \
|
||||
--param asan-instrumentation-with-call-threshold=0 \
|
||||
-fsanitize-address-use-after-scope \
|
||||
|
Reference in New Issue
Block a user