WSL2-Linux-Kernel/arch/powerpc
Michael Ellerman 7a60594efd powerpc/kasan: Force thread size increase with KASAN
[ Upstream commit 3e8635fb2e ]

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: edbadaf067 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:16 +02:00
..
boot powerpc: dts: t104xrdb: fix phy type for FMAN 4/5 2022-04-13 20:59:02 +02:00
configs Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH 2022-01-27 11:05:21 +01:00
crypto
include powerpc/kasan: Force thread size increase with KASAN 2022-06-14 18:36:16 +02:00
kernel powerpc/idle: Fix return value of __setup() handler 2022-06-09 10:23:10 +02:00
kexec powerpc: Set crashkernel offset to mid of RMA region 2022-04-13 20:59:03 +02:00
kvm KVM: PPC: Book3S HV Nested: L2 LPCR should inherit L1 LPES setting 2022-06-09 10:22:42 +02:00
lib powerpc/lib/sstep: Fix build errors with newer binutils 2022-04-08 14:24:04 +02:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/64s/hash: Make hash faults work in NMI context 2022-04-13 20:59:07 +02:00
net powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06 2022-02-01 17:27:09 +01:00
perf powerpc/perf: Fix the threshold compare group constraint for power9 2022-06-09 10:23:12 +02:00
platforms powerpc/4xx/cpm: Fix return value of __setup() handler 2022-06-09 10:23:10 +02:00
purgatory
sysdev powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup 2022-06-09 10:23:12 +02:00
tools powerpc/64: Add UADDR64 relocation support 2022-05-09 09:14:44 +02:00
xmon powerpc/xmon: fix task state output 2021-11-18 19:16:57 +01:00
Kbuild
Kconfig powerpc/kasan: Force thread size increase with KASAN 2022-06-14 18:36:16 +02:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile powerpc/Makefile: Don't pass -mcpu=powerpc64 when building 32-bit 2022-04-08 14:23:36 +02:00
Makefile.postlink