summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2020-04-08 15:58:49 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-24 17:50:12 +0200
commit91fce7922a756127ad2aaea6cce87a95f71f5a4c (patch)
tree09f9525e1262ee5c7076382c511d984972b4cc55
parenta6a0317bf9c2f1604f50a389b6711c53509e5e0d (diff)
downloadlinux-stable-91fce7922a756127ad2aaea6cce87a95f71f5a4c.tar.gz
linux-stable-91fce7922a756127ad2aaea6cce87a95f71f5a4c.tar.bz2
linux-stable-91fce7922a756127ad2aaea6cce87a95f71f5a4c.zip
powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT
[ Upstream commit edbadaf0671072298e506074128b64e003c5812c ] When CONFIG_KASAN is selected, the stack usage is increased. In the same way as x86 and arm64 architectures, increase THREAD_SHIFT when CONFIG_KASAN is selected. Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support") Reported-by: <erhard_f@mailbox.org> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://bugzilla.kernel.org/show_bug.cgi?id=207129 Link: https://lore.kernel.org/r/2c50f3b1c9bbaa4217c9a98f3044bd2a36c46a4f.1586361277.git.christophe.leroy@c-s.fr Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/powerpc/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 44431dc06982..ad620637cbd1 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -747,6 +747,7 @@ config THREAD_SHIFT
range 13 15
default "15" if PPC_256K_PAGES
default "14" if PPC64
+ default "14" if KASAN
default "13"
help
Used to define the stack size. The default is almost always what you