kernel_samsung_a53x/arch/arm64/include/asm
Jonathan Cameron c71f1763b9 arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry
[ Upstream commit 2488444274c70038eb6b686cba5f1ce48ebb9cdd ]

In a review discussion of the changes to support vCPU hotplug where
a check was added on the GICC being enabled if was online, it was
noted that there is need to map back to the cpu and use that to index
into a cpumask. As such, a valid ID is needed.

If an MPIDR check fails in acpi_map_gic_cpu_interface() it is possible
for the entry in cpu_madt_gicc[cpu] == NULL.  This function would
then cause a NULL pointer dereference.   Whilst a path to trigger
this has not been established, harden this caller against the
possibility.

Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240529133446.28446-13-Jonathan.Cameron@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:08 +01:00
..
vdso Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acenv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi.h arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry 2024-11-23 23:21:08 +01:00
alternative-macros.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
alternative.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arch_gicv3.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arch_timer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
archrandom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm-cci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm_dsu_pmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-bug.h arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY 2024-11-19 12:27:09 +01:00
asm-offsets.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-prototypes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-uaccess.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm_pointer_auth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
assembler.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atomic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atomic_ll_sc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atomic_lse.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
barrier.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bitops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bitrev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
boot.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
brk-imm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cache.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cacheflush.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
checksum.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clocksource.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cmpxchg.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
compat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
compiler.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpucaps.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpufeature.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpuidle.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cputype.h arm64: cputype: Add Cortex-A725 definitions 2024-11-23 23:20:26 +01:00
current.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
daifflags.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dcc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug-monitors.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma-mapping-noalias.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
el2_setup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exception.h arm64: allow kprobes on EL0 handlers 2024-11-08 11:26:02 +01:00
exec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
extable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fixmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpsimd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpsimdmacros.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
futex.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hardirq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugetlb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw_breakpoint.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwcap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hyp_image.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hypervisor.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
image.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
insn.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq_work.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irqflags.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jump_label.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kasan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kbuild Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kernel-pgtable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kexec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kfence.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kprobes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_arm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_asm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_emulate.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_host.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_hyp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_pgtable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_ptrauth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_ras.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
linkage.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lse.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
memory.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mman.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu_context.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmzone.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module.lds.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mte-def.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mte-kasan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mte.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neon-intrinsics.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neon.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
numa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
page-def.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
page.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
paravirt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
percpu.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
perf_event.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgalloc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable-hwdef.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable-prot.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable-types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable.h arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify 2024-11-18 12:11:57 +01:00
pointer_auth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
preempt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
probes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc-fns.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
ptdump.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptrace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvclock-abi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rwonce.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdei.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seccomp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sections.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
shmparam.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signal32.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
simd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smp_plat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sparsemem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectre.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spinlock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spinlock_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stack_pointer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stackprotector.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stacktrace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stage2_pgtable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
string.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
suspend.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sync_bitops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall_wrapper.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysreg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
system_misc.h arm64: die(): pass 'err' as long 2024-11-08 11:25:59 +01:00
thread_info.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timex.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlbflush.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
topology.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traps.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uaccess.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unistd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unistd32.h syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-11-19 14:19:34 +01:00
uprobes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vdso.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vectors.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vermagic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmalloc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmap_stack.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
word-at-a-time.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xor.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00