summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Ryabinin <ryabinin.a.a@gmail.com>2015-08-11 05:18:14 +0300
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:49:36 +0900
commite7663bbd7fa92fad65f858643e17bd3ac3f7b853 (patch)
tree19124818bee79bd1eef8d2c1e603a4b4d0bb3d19
parentb2484925940af62015933c9db2c95382cdd82f2c (diff)
x86/kasan: define KASAN_SHADOW_OFFSET per architecture
Current definition of KASAN_SHADOW_OFFSET in include/linux/kasan.h will not work for upcomming arm64, so move it to the arch header. Signed-off-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
-rw-r--r--arch/x86/include/asm/kasan.h3
-rw-r--r--include/linux/kasan.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kasan.h b/arch/x86/include/asm/kasan.h
index 74a2a8dc9908..1410b567ecde 100644
--- a/arch/x86/include/asm/kasan.h
+++ b/arch/x86/include/asm/kasan.h
@@ -1,6 +1,9 @@
#ifndef _ASM_X86_KASAN_H
#define _ASM_X86_KASAN_H
+#include <linux/const.h>
+#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL)
+
/*
* Compiler uses shadow offset assuming that addresses start
* from 0. Kernel addresses don't start from 0, so shadow
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 5486d777b706..6fb1c7d4292c 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -10,7 +10,6 @@ struct vm_struct;
#ifdef CONFIG_KASAN
#define KASAN_SHADOW_SCALE_SHIFT 3
-#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL)
#include <asm/kasan.h>
#include <linux/sched.h>