Skip to contentSkip to conversation

kasan-turn-on-fsanitize-address-use-after-scope.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 14, 2016

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kasan: turn on -fsanitize-address-use-after-scope
has been removed from the -mm tree. Its filename was
kasan-turn-on-fsanitize-address-use-after-scope.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Andrey Ryabinin <[email protected]>
Subject: 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.

---

 scripts/Makefile.kasan |    2 ++
 1 file changed, 2 insertions(+)
scripts/Makefile.kasan renamed from scripts/Makefile.kasan~kasan-turn-on-fsanitize-address-use-after-scope +2 -0
diff -puN scripts/Makefile.kasan~kasan-turn-on-fsanitize-address-use-after-scope 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

_

Patches currently in -mm which might be from [email protected] are