linux/arch/arm64/include/asm
Ard Biesheuvel de2af657ca arm64: efi: Execute runtime services from a dedicated stack
commit ff7a167961 upstream.

With the introduction of PRMT in the ACPI subsystem, the EFI rts
workqueue is no longer the only caller of efi_call_virt_pointer() in the
kernel. This means the EFI runtime services lock is no longer sufficient
to manage concurrent calls into firmware, but also that firmware calls
may occur that are not marshalled via the workqueue mechanism, but
originate directly from the caller context.

For added robustness, and to ensure that the runtime services have 8 KiB
of stack space available as per the EFI spec, introduce a spinlock
protected EFI runtime stack of 8 KiB, where the spinlock also ensures
serialization between the EFI rts workqueue (which itself serializes EFI
runtime calls) and other callers of efi_call_virt_pointer().

While at it, use the stack pivot to avoid reloading the shadow call
stack pointer from the ordinary stack, as doing so could produce a
gadget to defeat it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 07:22:48 +01:00
..
vdso
xen
Kbuild
acenv.h
acpi.h
alternative-macros.h
alternative.h
arch_gicv3.h
arch_timer.h
archrandom.h
arm-cci.h
arm_dsu_pmu.h
asm-bug.h
asm-offsets.h
asm-prototypes.h
asm-uaccess.h
asm_pointer_auth.h
assembler.h
atomic.h
atomic_ll_sc.h arm64: cmpxchg_double*: hazard against entire exchange variable 2023-01-18 11:48:58 +01:00
atomic_lse.h arm64: cmpxchg_double*: hazard against entire exchange variable 2023-01-18 11:48:58 +01:00
barrier.h
bitops.h
bitrev.h
boot.h
brk-imm.h
bug.h
cache.h
cacheflush.h
checksum.h
clocksource.h
cmpxchg.h
compat.h
compiler.h
cpu.h
cpu_ops.h
cpufeature.h
cpuidle.h
cputype.h arm64: Fix bit-shifting UB in the MIDR_CPU_MODEL() macro 2022-11-26 09:24:36 +01:00
current.h
daifflags.h
dcc.h
debug-monitors.h arm64: Treat ESR_ELx as a 64-bit register 2022-12-31 13:13:58 +01:00
device.h
dmi.h
efi.h arm64: efi: Execute runtime services from a dedicated stack 2023-01-24 07:22:48 +01:00
el2_setup.h
elf.h
esr.h arm64: Treat ESR_ELx as a 64-bit register 2022-12-31 13:13:58 +01:00
exception.h arm64: Treat ESR_ELx as a 64-bit register 2022-12-31 13:13:58 +01:00
exec.h
extable.h
fb.h
fixmap.h
fpsimd.h
fpsimdmacros.h
ftrace.h
futex.h
hardirq.h
hugetlb.h
hw_breakpoint.h
hwcap.h
hyp_image.h
hyperv-tlfs.h
hypervisor.h
image.h
insn-def.h
insn.h
io.h
irq.h
irq_work.h
irqflags.h
jump_label.h
kasan.h
kernel-pgtable.h
kexec.h
kfence.h
kgdb.h
kprobes.h
kvm_arm.h
kvm_asm.h
kvm_emulate.h KVM: arm64: Fix S1PTW handling on RO memslots 2023-01-18 11:48:47 +01:00
kvm_host.h KVM: arm64: Treat PMCR_EL1.LC as RES1 on asymmetric systems 2022-08-25 11:40:29 +02:00
kvm_hyp.h
kvm_mmu.h
kvm_mte.h
kvm_pgtable.h
kvm_ptrauth.h
kvm_ras.h
kvm_types.h
linkage.h
lse.h
memory.h
mman.h
mmu.h
mmu_context.h
mmzone.h
module.h
module.lds.h
mshyperv.h
mte-def.h
mte-kasan.h
mte.h arm64: mte: move register initialization to C 2022-10-29 10:12:57 +02:00
neon-intrinsics.h
neon.h
numa.h
page-def.h
page.h
paravirt.h
patching.h
pci.h
percpu.h
perf_event.h
pgalloc.h
pgtable-hwdef.h arm64/mm: Consolidate TCR_EL1 fields 2022-10-29 10:12:53 +02:00
pgtable-prot.h
pgtable-types.h
pgtable.h
pointer_auth.h
preempt.h
probes.h
proc-fns.h
processor.h arm64: make is_ttbrX_addr() noinstr-safe 2022-12-31 13:14:39 +01:00
ptdump.h
ptrace.h
pvclock-abi.h
rwonce.h
scs.h
sdei.h
seccomp.h
sections.h
set_memory.h
setup.h
shmparam.h
signal.h
signal32.h
simd.h
smp.h
smp_plat.h
sparsemem.h
spectre.h
spinlock.h
spinlock_types.h
stack_pointer.h
stackprotector.h
stacktrace.h
stage2_pgtable.h
stat.h
string.h
suspend.h
sync_bitops.h
syscall.h
syscall_wrapper.h arm64/syscall: Include asm/ptrace.h in syscall_wrapper header. 2022-12-02 17:41:02 +01:00
sysreg.h arm64/mm: Consolidate TCR_EL1 fields 2022-10-29 10:12:53 +02:00
system_misc.h arm64: Treat ESR_ELx as a 64-bit register 2022-12-31 13:13:58 +01:00
thread_info.h
timex.h
tlb.h
tlbflush.h
topology.h
trans_pgd.h
traps.h arm64: Treat ESR_ELx as a 64-bit register 2022-12-31 13:13:58 +01:00
uaccess.h
unistd.h
unistd32.h
uprobes.h
vdso.h
vectors.h
vermagic.h
virt.h
vmalloc.h
vmap_stack.h
word-at-a-time.h
xor.h