Skip to content

Commit feb8e96

Browse files
chleroympe
authored andcommitted
powerpc/mm: Fix CONFIG_PPC_KUAP_DEBUG on PPC32
CONFIG_PPC_KUAP_DEBUG is not selectable because it depends on PPC_32 which doesn't exists. Fixing it leads to a deadlock due to a vital register getting clobbered in _switch(). Change dependency to PPC32 and use r0 instead of r4 in _switch() Fixes: e2fb9f5 ("powerpc/32: Prepare for Kernel Userspace Access Protection") Cc: [email protected] # v5.2+ Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/540242f7d4573f7cdf1b3bf46bb35f743b2cd68f.1587124651.git.christophe.leroy@c-s.fr
1 parent b61c38b commit feb8e96

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/powerpc/kernel/entry_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPE)
732732
stw r10,_CCR(r1)
733733
stw r1,KSP(r3) /* Set old stack pointer */
734734

735-
kuap_check r2, r4
735+
kuap_check r2, r0
736736
#ifdef CONFIG_SMP
737737
/* We need a sync somewhere here to make sure that if the
738738
* previous task gets rescheduled on another CPU, it sees all

arch/powerpc/platforms/Kconfig.cputype

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ config PPC_KUAP
397397

398398
config PPC_KUAP_DEBUG
399399
bool "Extra debugging for Kernel Userspace Access Protection"
400-
depends on PPC_KUAP && (PPC_RADIX_MMU || PPC_32)
400+
depends on PPC_KUAP && (PPC_RADIX_MMU || PPC32)
401401
help
402402
Add extra debugging for Kernel Userspace Access Protection (KUAP)
403403
If you're unsure, say N.

0 commit comments

Comments
 (0)