linux-stable/arch/arm64/kernel
Xiang Yang f7e0231eea Revert "arm64: Stash shadow stack pointer in the task struct on interrupt"
This reverts commit 3f225f29c6 which is
commit 59b37fe52f upstream.

The shadow call stack for irq now is stored in current task's thread info
in irq_stack_entry. There is a possibility that we have some soft irqs
pending at the end of hard irq, and when we process softirq with the irq
enabled, irq_stack_entry will enter again and overwrite the shadow call
stack whitch stored in current task's thread info, leading to the
incorrect shadow call stack restoration for the first entry of the hard
IRQ, then the system end up with a panic.

task A                               |  task A
-------------------------------------+------------------------------------
el1_irq        //irq1 enter          |
  irq_handler  //save scs_sp1        |
    gic_handle_irq                   |
    irq_exit                         |
      __do_softirq                   |
                                     | el1_irq         //irq2 enter
                                     |   irq_handler   //save scs_sp2
                                     |                 //overwrite scs_sp1
                                     |   ...
                                     |   irq_stack_exit //restore scs_sp2
  irq_stack_exit //restore wrong     |
                 //scs_sp2           |

So revert this commit to fix it.

Fixes: 3f225f29c6 ("arm64: Stash shadow stack pointer in the task struct on interrupt")
Signed-off-by: Xiang Yang <xiangyang3@huawei.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:42:31 +01:00
..
probes
vdso
vdso32
.gitignore
acpi.c
acpi_numa.c
acpi_parking_protocol.c
alternative.c
armv8_deprecated.c arm64: armv8_deprecated: fix unused-function error 2023-10-25 11:54:17 +02:00
asm-offsets.c
cacheinfo.c arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level 2022-09-15 11:32:03 +02:00
cpu-reset.h
cpu-reset.S
cpu_errata.c arm64: errata: Remove AES hwcap for COMPAT tasks 2022-10-30 09:41:16 +01:00
cpu_ops.c
cpufeature.c arm64: rework EL0 MRS emulation 2023-10-25 11:54:17 +02:00
cpuidle.c
cpuinfo.c
crash_core.c
crash_dump.c
debug-monitors.c arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step 2023-05-17 11:47:45 +02:00
efi-entry.S
efi-header.S
efi-rt-wrapper.S efi: rt-wrapper: Add missing include 2023-01-24 07:20:01 +01:00
efi.c arm64: efi: Make efi_rt_lock a raw_spinlock 2023-03-17 08:45:08 +01:00
entry-common.c arm64: split EL0/EL1 UNDEF handlers 2023-10-25 11:54:17 +02:00
entry-fpsimd.S
entry-ftrace.S
entry.S Revert "arm64: Stash shadow stack pointer in the task struct on interrupt" 2024-02-23 08:42:31 +01:00
fpsimd.c
ftrace.c arm64: ftrace: fix module PLTs with mcount 2022-10-26 13:25:29 +02:00
head.S arm64: Always load shadow stack pointer directly from the task struct 2023-05-17 11:48:07 +02:00
hibernate-asm.S
hibernate.c
hw_breakpoint.c hw_breakpoint: fix single-stepping when using bpf_overflow_handler 2023-09-23 11:01:05 +02:00
hyp-stub.S
image-vars.h KVM: arm64: Link position-independent string routines into .hyp.text 2023-05-30 12:57:55 +01:00
image.h
insn.c
io.c
irq.c
jump_label.c
kaslr.c
kexec_image.c
kgdb.c arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step 2023-05-17 11:47:45 +02:00
kuser32.S
machine_kexec.c
machine_kexec_file.c
Makefile
module-plts.c arm64: module: Use module_init_layout_section() to spot init sections 2023-09-02 09:18:13 +02:00
module.c
mte.c
paravirt.c
pci.c
perf_callchain.c
perf_event.c drivers/perf: pmuv3: don't expose SW_INCR event in sysfs 2024-02-23 08:42:02 +01:00
perf_regs.c
pointer_auth.c
process.c arch: setup PF_IO_WORKER threads like PF_KTHREAD 2023-01-04 11:39:22 +01:00
proton-pack.c arm64: factor out EL1 SSBS emulation hook 2023-10-25 11:54:17 +02:00
psci.c
ptrace.c
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S
return_address.c
scs.c
sdei.c arm64: sdei: abort running SDEI handlers during crash 2023-09-19 12:20:28 +02:00
setup.c
signal.c arm64: add support for TIF_NOTIFY_SIGNAL 2023-01-04 11:39:19 +01:00
signal32.c
sigreturn32.S
sleep.S
smccc-call.S
smp.c arm64: sdei: abort running SDEI handlers during crash 2023-09-19 12:20:28 +02:00
smp_spin_table.c
stacktrace.c
suspend.c
sys.c
sys32.c
sys_compat.c
syscall.c
time.c
topology.c arm64: topology: move store_cpu_topology() to shared code 2022-10-30 09:41:19 +01:00
trace-events-emulation.h
traps.c arm64: armv8_deprecated: rework deprected instruction handling 2023-10-25 11:54:17 +02:00
vdso.c
vmlinux.lds.S