linux-stable/arch
Michael Ellerman 4e2e17a8fb 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:45:04 +02:00
..
alpha alpha: fix alloc_zeroed_user_highpage_movable() 2022-06-09 10:29:51 +02:00
arc ARC: remove redundant READ_ONCE() in cmpxchg loop 2022-04-18 14:47:05 -07:00
arm ep93xx: clock: Do not return the address of the freed memory 2022-06-14 18:44:55 +02:00
arm64 arm64: tegra: Add missing DFLL reset on Tegra210 2022-06-09 10:30:53 +02:00
csky csky: patch_text: Fixup last cpu should be master 2022-06-09 10:30:50 +02:00
h8300 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
hexagon ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
ia64 ia64: define get_cycles macro for arch-override 2022-05-30 09:24:04 +02:00
m68k m68knommu: fix undefined reference to `mach_get_rtc_pll' 2022-06-14 18:45:03 +02:00
microblaze Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
mips mips: cpc: Fix refcount leak in mips_cpc_default_phys_base 2022-06-14 18:45:01 +02:00
nios2 nios2: use fallback for random_get_entropy() instead of zero 2022-05-30 09:24:05 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:29:44 +02:00
parisc parisc/stifb: Implement fb_is_primary_device() 2022-06-09 10:29:26 +02:00
powerpc powerpc/kasan: Force thread size increase with KASAN 2022-06-14 18:45:04 +02:00
riscv RISC-V: use memcpy for kexec_file mode 2022-06-14 18:45:03 +02:00
s390 s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag 2022-06-14 18:44:59 +02:00
sh Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
sparc signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:30:00 +02:00
um um: chan_user: Fix winch_tramp() return value 2022-06-09 10:30:50 +02:00
x86 kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] 2022-06-09 10:30:51 +02:00
xtensa xtensa/simdisk: fix proc_read_simdisk() 2022-06-09 10:30:52 +02:00
.gitignore
Kconfig vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP 2022-04-19 12:08:57 -07:00