android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
James Morse 0091429095 KVM: arm64: Check arm64_get_bp_hardening_data() didn't return NULL
Will reports that with CONFIG_EXPERT=y and CONFIG_HARDEN_BRANCH_PREDICTOR=n,
the kernel dereferences a NULL pointer during boot:

[    2.384444] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[    2.384461] pstate: 20400085 (nzCv daIf +PAN -UAO)
[    2.384472] pc : cpu_hyp_reinit+0x114/0x30c
[    2.384476] lr : cpu_hyp_reinit+0x80/0x30c

[    2.384529] Call trace:
[    2.384533]  cpu_hyp_reinit+0x114/0x30c
[    2.384537]  _kvm_arch_hardware_enable+0x30/0x54
[    2.384541]  flush_smp_call_function_queue+0xe4/0x154
[    2.384544]  generic_smp_call_function_single_interrupt+0x10/0x18
[    2.384549]  ipi_handler+0x170/0x2b0
[    2.384555]  handle_percpu_devid_fasteoi_ipi+0x120/0x1cc
[    2.384560]  __handle_domain_irq+0x9c/0xf4
[    2.384563]  gic_handle_irq+0x6c/0xe4
[    2.384566]  el1_irq+0xf0/0x1c0
[    2.384570]  arch_cpu_idle+0x28/0x44
[    2.384574]  do_idle+0x100/0x2a8
[    2.384577]  cpu_startup_entry+0x20/0x24
[    2.384581]  secondary_start_kernel+0x1b0/0x1cc
[    2.384589] Code: b9469d08 7100011f 540003ad 52800208 (f9400108)
[    2.384600] ---[ end trace 266d08dbf96ff143 ]---
[    2.385171] Kernel panic - not syncing: Fatal exception in interrupt

In this configuration arm64_get_bp_hardening_data() returns NULL.
Add a check in kvm_get_hyp_vector().

Cc: Will Deacon <[email protected]>
Link: https://lore.kernel.org/linux-arm-kernel/20220408120041.GB27685@willie-the-truck/
Fixes: 26129ea295 ("KVM: arm64: Add templates for BHB mitigation sequences")
Cc: [email protected] # 5.4.x
Signed-off-by: James Morse <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2022-04-15 14:18:36 +02:00
..
alpha
arc
arm ARM: 9187/1: JIVE: fix return value of __setup handler 2022-04-15 14:18:31 +02:00
arm64 KVM: arm64: Check arm64_get_bp_hardening_data() didn't return NULL 2022-04-15 14:18:36 +02:00
c6x
csky perf: Protect perf_guest_cbs with RCU 2022-01-20 09:19:18 +01:00
h8300
hexagon hexagon: export raw I/O routines for modules 2021-11-26 10:47:21 +01:00
ia64 ia64: ensure proper NUMA distance and possible map initialization 2022-03-08 19:07:48 +01:00
m68k
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-15 14:18:08 +02:00
mips MIPS: fix fortify panic when copying asm exception handlers 2022-04-15 14:18:34 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 08:46:48 +02:00
nios2 uaccess: fix nios2 and microblaze get_user_8() 2022-04-15 14:18:08 +02:00
openrisc
parisc parisc: Fix patch code locking and flushing 2022-04-15 14:18:36 +02:00
powerpc powerpc: Set crashkernel offset to mid of RMA region 2022-04-15 14:18:32 +02:00
riscv riscv module: remove (NOLOAD) 2022-04-15 14:18:31 +02:00
s390 s390/hypfs: include z/VM guests with access control group set 2022-02-01 17:24:33 +01:00
sh
sparc
um um: Fix uml_mconsole stop/go 2022-04-15 14:18:31 +02:00
unicore32
x86 xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32 2022-04-15 14:18:35 +02:00
xtensa xtensa: fix DTC warning unit_address_format 2022-04-15 14:18:34 +02:00
.gitignore
Kconfig