[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1481207977-28654-1-git-send-email-aryabinin@virtuozzo.com>
Date: Thu, 8 Dec 2016 17:39:37 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>, <andreyknvl@...gle.com>,
<kasan-dev@...glegroups.com>, <linux-kernel@...r.kernel.org>,
Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: [PATCH v2] 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.
Signed-off-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
Acked-by: Dmitry Vyukov <dvyukov@...gle.com>
---
Changes since v1:
- s/release release/relase in changelog
- added Ack
scripts/Makefile.kasan | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 37323b0..9576775 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
--
2.7.3
Powered by blists - more mailing lists