]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390/kasan: enable stack and global variables access checks
authorVasily Gorbik <gor@linux.ibm.com>
Sun, 19 Nov 2017 10:39:39 +0000 (11:39 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Oct 2018 09:21:28 +0000 (11:21 +0200)
By defining KASAN_SHADOW_OFFSET in Kconfig stack and global variables
memory access check instrumentation is enabled. gcc version 4.9.2 or
newer is also required.

Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Kconfig
arch/s390/include/asm/kasan.h

index 95fff775ac7c40e40d433f326dddaa482aea4fc1..24586257c5cd74994f6df5d2491a84e5eb3ebea2 100644 (file)
@@ -56,6 +56,11 @@ config PCI_QUIRKS
 config ARCH_SUPPORTS_UPROBES
        def_bool y
 
+config KASAN_SHADOW_OFFSET
+       hex
+       depends on KASAN
+       default 0x30000000000
+
 config S390
        def_bool y
        select ARCH_BINFMT_ELF_STATE
index 7de6eceb562ee03922d279395e0572a484bb99cd..892f4585c663f7fc5462db0a12358932aa79d118 100644 (file)
@@ -9,7 +9,7 @@
 #define KASAN_SHADOW_SCALE_SHIFT 3
 #define KASAN_SHADOW_SIZE                                                     \
        (_AC(1, UL) << (_REGION2_SHIFT - KASAN_SHADOW_SCALE_SHIFT))
-#define KASAN_SHADOW_OFFSET    _AC(0x30000000000, UL)
+#define KASAN_SHADOW_OFFSET    _AC(CONFIG_KASAN_SHADOW_OFFSET, UL)
 #define KASAN_SHADOW_START     KASAN_SHADOW_OFFSET
 #define KASAN_SHADOW_END       (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)