linux/arch/powerpc/kernel
Christophe Leroy (CS GROUP) 608328ba5b powerpc/32: Restore disabling of interrupts at interrupt/syscall exit
Commit 2997876c4a ("powerpc/32: Restore clearing of MSR[RI] at
interrupt/syscall exit") delayed clearing of MSR[RI], but missed that
both MSR[RI] and MSR[EE] are cleared at the same time, so the commit
also delayed the disabling of interrupts, leading to unexpected
behaviour.

To fix that, mostly revert the blamed commit and restore the clearing
of MSR[RI] in interrupt_exit_kernel_prepare() instead. For 8xx it
implies adding a synchronising instruction after the mtspr in order to
make sure no instruction counter interrupt (used for perf events) will
fire just after clearing MSR[RI].

Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Closes: https://lore.kernel.org/all/4d0bd05d-6158-1323-3509-744d3fbe8fc7@xenosoft.de/
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/6b05eb1c-fdef-44e0-91a7-8286825e68f1@roeck-us.net/
Fixes: 2997876c4a ("powerpc/32: Restore clearing of MSR[RI] at interrupt/syscall exit")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/585ea521b2be99d293b539bbfae148366cfb3687.1766146895.git.chleroy@kernel.org
2025-12-22 18:25:07 +05:30
..
ptrace powerpc/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:48 -07:00
syscalls arch: hookup listns() system call 2025-11-03 17:41:18 +01:00
trace powerpc/ftrace: support CONFIG_FUNCTION_GRAPH_RETVAL 2025-09-16 16:13:00 +05:30
vdso powerpc/vdso: Fix build of VDSO32 with pcrel 2025-06-13 12:30:15 +05:30
.gitignore
85xx_entry_mapping.S
Makefile powerpc: use always-y instead of extra-y in Makefiles 2025-08-20 14:02:13 +05:30
align.c
asm-offsets.c arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
audit.c
audit_32.h
btext.c powerpc: Add reloc_offset() to font bitmap pointer used for bootx_printf() 2025-12-22 17:59:07 +05:30
cacheinfo.c
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_e500.S
cpu_setup_pa6t.S
cpu_setup_power.c
cpu_setup_ppc970.S
cpu_specs.h
cpu_specs_8xx.h
cpu_specs_44x.h
cpu_specs_47x.h
cpu_specs_85xx.h
cpu_specs_book3s_32.h
cpu_specs_book3s_64.h
cpu_specs_e500mc.h
cputable.c
crash_dump.c
dawr.c
dbell.c
dexcr.c
dma-iommu.c powerpc: Convert to physical address DMA mapping 2025-10-29 10:27:30 +01:00
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c
early_32.c
eeh.c powerpc/eeh: Export eeh_unfreeze_pe() 2025-07-26 13:07:52 +05:30
eeh_cache.c
eeh_driver.c powerpc/eeh: Use result of error_detected() in uevent 2025-08-14 15:58:11 -05:00
eeh_event.c
eeh_pe.c powerpc/eeh: Make EEH driver device hotplug safe 2025-07-26 13:09:10 +05:30
eeh_sysfs.c
entry_32.S powerpc/32: Restore disabling of interrupts at interrupt/syscall exit 2025-12-22 18:25:07 +05:30
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S
exceptions-64s.S
fadump.c powerpc/fadump: skip parameter area allocation when fadump is disabled 2025-10-13 09:41:31 +05:30
firmware.c
fpu.S
head_8xx.S powerpc/8xx: Remove left-over instruction and comments in DataStoreTLBMiss handler 2025-09-15 13:48:22 +05:30
head_32.h
head_44x.S
head_64.S
head_85xx.S
head_book3s_32.S
head_booke.h powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-01 13:23:29 +05:30
hw_breakpoint.c
hw_breakpoint_constraints.c
idle.c
idle_6xx.S
idle_64e.S
idle_85xx.S
idle_book3s.S
ima_arch.c
interrupt.c powerpc/32: Restore disabling of interrupts at interrupt/syscall exit 2025-12-22 18:25:07 +05:30
interrupt_64.S
io.c
iomap.c
iommu.c dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
irq.c
irq_64.c
isa-bridge.c
jump_label.c
kdebugfs.c
kgdb.c
kprobes-ftrace.c
kprobes.c
kvm.c powerpc/kvm: Fix ifdef to remove build warning 2025-08-20 14:03:44 +05:30
kvm_emul.S
l2cr_6xx.S
legacy_serial.c serial: 8250: sanitize uart_port::serial_{in,out}() types 2025-06-17 13:42:34 +02:00
mce.c
mce_power.c
misc.S
misc_32.S
misc_64.S
module.c
module_32.c
module_64.c powerpc64/modules: replace stub allocation sentinel with an explicit counter 2025-09-15 16:40:52 +05:30
msi.c
note.S
nvram_64.c
optprobes.c
optprobes_head.S
paca.c
pci-common.c
pci-hotplug.c PCI: pnv_php: Fix surprise plug detection and recovery 2025-07-26 13:09:15 +05:30
pci_32.c
pci_64.c
pci_dn.c
pci_of_scan.c
pmc.c
ppc_save_regs.S
proc_powerpc.c powerpc: Replace strcpy() with strscpy() in proc_ppc64_init() 2025-05-15 09:54:54 +05:30
process.c powerpc/64s/slb: Fix SLB multihit issue during SLB preload 2025-11-18 12:35:52 +05:30
prom.c
prom_entry_64.S
prom_init.c
prom_init_check.sh powerpc/prom_init: Fix shellcheck warnings 2025-08-20 14:05:18 +05:30
prom_parse.c
reloc_32.S
reloc_64.S
rethook.c
rtas-proc.c
rtas-rtc.c
rtas.c powerpc/pseries: Define HVPIPE specific macros 2025-09-15 13:38:40 +05:30
rtas_entry.S
rtas_flash.c powerpc: rtas: use lock guard for mutex 2025-06-23 09:57:10 +05:30
rtas_pci.c
rtasd.c powerpc/pseries: Define HVPIPE specific macros 2025-09-15 13:38:40 +05:30
secure_boot.c
security.c
secvar-ops.c
secvar-sysfs.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
setup-common.c powerpc/kdump: Add support for crashkernel CMA reservation 2025-11-11 14:11:08 +05:30
setup.h
setup_32.c
setup_64.c powerpc/64: Drop unnecessary 'rc' variable 2025-08-20 13:54:05 +05:30
signal.c
signal.h
signal_32.c
signal_64.c
smp-tbsync.c
smp.c powerpc/smp: Expose die_id and die_cpumask 2025-11-14 11:12:56 +05:30
stacktrace.c
static_call.c
suspend.c
switch.S
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_85xx.S
swsusp_asm64.S
sys_ppc32.c
syscall.c
syscalls.c
sysfs.c
systbl.c
tau_6xx.c
time.c powerpc/time: Expose boot_tb via accessor 2025-09-22 14:48:56 +05:30
tm.S
traps.c
ucall.S
udbg.c
udbg_16550.c
uprobes.c
vdso.c powerpc/vdso: Include asm/syscalls.h for sys_ni_syscall() 2025-09-06 16:02:51 +05:30
vdso32_wrapper.S
vdso64_wrapper.S
vecemu.c
vector.S
vmlinux.lds.S powerpc/vmlinux.lds: Drop .interp description 2025-11-11 14:23:27 +05:30
watchdog.c