aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init_task.h
diff options
context:
space:
mode:
authorAndrey Ryabinin <a.ryabinin@samsung.com>2015-02-13 17:39:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-14 00:21:41 -0500
commitc420f167db8c799d69fe43a801c58a7f02e9d57c (patch)
tree3dff6731a0459d554ae81d07b557721d6b72f773 /include/linux/init_task.h
parent393f203f5fd54421fddb1e2a263f64d3876eeadb (diff)
kasan: enable stack instrumentation
Stack instrumentation allows to detect out of bounds memory accesses for variables allocated on stack. Compiler adds redzones around every variable on stack and poisons redzones in function's prologue. Such approach significantly increases stack usage, so all in-kernel stacks size were doubled. Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Konstantin Serebryany <kcc@google.com> Cc: Dmitry Chernenkov <dmitryc@google.com> Signed-off-by: Andrey Konovalov <adech.fo@gmail.com> Cc: Yuri Gribov <tetra2005@gmail.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Christoph Lameter <cl@linux.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r--include/linux/init_task.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index d3d43ecf148c..696d22312b31 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -175,6 +175,13 @@ extern struct task_group root_task_group;
175# define INIT_NUMA_BALANCING(tsk) 175# define INIT_NUMA_BALANCING(tsk)
176#endif 176#endif
177 177
178#ifdef CONFIG_KASAN
179# define INIT_KASAN(tsk) \
180 .kasan_depth = 1,
181#else
182# define INIT_KASAN(tsk)
183#endif
184
178/* 185/*
179 * INIT_TASK is used to set up the first task table, touch at 186 * INIT_TASK is used to set up the first task table, touch at
180 * your own risk!. Base=0, limit=0x1fffff (=2MB) 187 * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -250,6 +257,7 @@ extern struct task_group root_task_group;
250 INIT_RT_MUTEXES(tsk) \ 257 INIT_RT_MUTEXES(tsk) \
251 INIT_VTIME(tsk) \ 258 INIT_VTIME(tsk) \
252 INIT_NUMA_BALANCING(tsk) \ 259 INIT_NUMA_BALANCING(tsk) \
260 INIT_KASAN(tsk) \
253} 261}
254 262
255 263