summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.kasan
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2016-12-12 16:44:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 18:55:09 -0800
commitc5caf21ab0cf884ef15b25af234f620e4a233139 (patch)
tree005cc4e5e5756bc6002c4fa7a5b51338c1415dd8 /scripts/Makefile.kasan
parent64abdcb24351a27bed6e2b6a3c27348fe532c73f (diff)
downloadlinux-c5caf21ab0cf884ef15b25af234f620e4a233139.tar.gz
linux-c5caf21ab0cf884ef15b25af234f620e4a233139.tar.bz2
linux-c5caf21ab0cf884ef15b25af234f620e4a233139.zip
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 828347f8f9a5 ("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/1481207977-28654-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by: Dmitry Vyukov <dvyukov@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.kasan')
-rw-r--r--scripts/Makefile.kasan2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 37323b0df374..9576775a86f6 100644
--- a/scripts/Makefile.kasan
+++ b/scripts/Makefile.kasan
@@ -28,4 +28,6 @@ else
CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
endif
endif
+
+CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope)
endif