diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-12-21 09:32:28 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-01-26 12:15:09 +0100 |
commit | 63289e7d3a645a4291ec43c1d526dd4a811da1a0 (patch) | |
tree | 0fca41eaaab4e435a4bb9b66910ad367133e72af /arch/powerpc/kernel/setup_64.c | |
parent | powerpc/32: prepare for CONFIG_VMAP_STACK (diff) | |
download | linux-63289e7d3a645a4291ec43c1d526dd4a811da1a0.tar.xz linux-63289e7d3a645a4291ec43c1d526dd4a811da1a0.zip |
powerpc: align stack to 2 * THREAD_SIZE with VMAP_STACK
In order to ease stack overflow detection, align
stack to 2 * THREAD_SIZE when using VMAP_STACK.
This allows overflow detection using a single bit check.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/60e9ae86b7d2cdcf21468787076d345663648f46.1576916812.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 6104917a282d..e05e6dd67ae6 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -633,7 +633,7 @@ static void *__init alloc_stack(unsigned long limit, int cpu) BUILD_BUG_ON(STACK_INT_FRAME_SIZE % 16); - ptr = memblock_alloc_try_nid(THREAD_SIZE, THREAD_SIZE, + ptr = memblock_alloc_try_nid(THREAD_SIZE, THREAD_ALIGN, MEMBLOCK_LOW_LIMIT, limit, early_cpu_to_node(cpu)); if (!ptr) |