mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
kasan: turn on -fsanitize-address-use-after-scope
In the upcoming gcc7 release, the -fsanitize=kernel-address option at
first implied new -fsanitize-address-use-after-scope option. This would
cause link errors on older kernels because they don't have two new
functions required for use-after-scope support. Therefore, gcc7 changed
default to -fno-sanitize-address-use-after-scope.
Now the kernel has everything required for that feature since commit
828347f8f9 ("kasan: support use-after-scope detection"). So, to make it
work, we just have to enable use-after-scope in CFLAGS.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andrey Ryabinin <[email protected]>
Acked-by: Dmitry Vyukov <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
64abdcb243
commit
c5caf21ab0
1 file changed
+2
@@ -28,4 +28,6 @@ else
|
||||
CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope)
|
||||
endif
|
||||
Reference in new issue
Block a user