aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Kconfig
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-06-02 00:31:14 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-06-02 22:56:47 +1000
commit3e8635fb2e072672cbc650989ffedf8300ad67fb (patch)
tree107baaf2dc0b2959aeaca60ca9d0bb6a50af255f /arch/powerpc/Kconfig
parentpowerpc/papr_scm: don't requests stats with '0' sized stats buffer (diff)
downloadlinux-dev-3e8635fb2e072672cbc650989ffedf8300ad67fb.tar.xz
linux-dev-3e8635fb2e072672cbc650989ffedf8300ad67fb.zip
powerpc/kasan: Force thread size increase with KASAN
KASAN causes increased stack usage, which can lead to stack overflows. The logic in Kconfig to suggest a larger default doesn't work if a user has CONFIG_EXPERT enabled and has an existing .config with a smaller value. Follow the lead of x86 and arm64, and force the thread size to be increased when KASAN is enabled. That also has the effect of enlarging the stack for 64-bit KASAN builds, which is also desirable. Fixes: edbadaf06710 ("powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT") Reported-by: Erhard Furtner <erhard_f@mailbox.org> Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu> [mpe: Use MIN_THREAD_SHIFT as suggested by Christophe] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220601143114.133524-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r--arch/powerpc/Kconfig1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 54dbbb1d4b36..b1760d615bb7 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -790,7 +790,6 @@ 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