linux-stable/arch/arm64/kvm
Marc Zyngier 8c2e8ac8ad KVM: arm64: Check for kvm_vma_mte_allowed in the critical section
On page fault, we find about the VMA that backs the page fault
early on, and quickly release the mmap_read_lock. However, using
the VMA pointer after the critical section is pretty dangerous,
as a teardown may happen in the meantime and the VMA be long gone.

Move the sampling of the MTE permission early, and NULL-ify the
VMA pointer after that, just to be on the safe side.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230316174546.3777507-3-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-03-16 23:42:56 +00:00
..
hyp ARM: 2023-02-25 11:30:21 -08:00
vgic KVM/arm64 updates for 6.3 2023-02-20 06:12:42 -05:00
.gitignore KVM: arm64: Generate hyp_constants.h for the host 2021-12-06 08:37:03 +00:00
arch_timer.c KVM: arm64: timers: Convert per-vcpu virtual offset to a global value 2023-03-11 02:00:40 -08:00
arm.c Merge branch kvm-arm64/nv-prefix into kvmarm/next 2023-02-13 23:33:41 +00:00
debug.c arm64: Drop SYS_ from SPE register defines 2023-01-19 18:30:22 +00:00
emulate-nested.c KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
fpsimd.c Merge branch kvm-arm64/misc into kvmarm/next 2023-02-13 23:33:25 +00:00
guest.c KVM/arm64 updates for 6.3 2023-02-20 06:12:42 -05:00
handle_exit.c KVM: arm64: nv: Handle SMCs taken from virtual EL2 2023-02-11 10:08:39 +00:00
hypercalls.c KVM: arm64: timers: Convert per-vcpu virtual offset to a global value 2023-03-11 02:00:40 -08:00
inject_fault.c KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
Kconfig KVM: Opt out of generic hardware enabling on s390 and PPC 2022-12-29 15:48:37 -05:00
Makefile KVM: arm64: nv: Filter out unsupported features from ID regs 2023-02-11 10:13:30 +00:00
mmio.c KVM: arm64: Generalise VM features into a set of flags 2022-03-18 14:02:33 +00:00
mmu.c KVM: arm64: Check for kvm_vma_mte_allowed in the critical section 2023-03-16 23:42:56 +00:00
nested.c KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID 2023-02-11 22:10:34 +00:00
pkvm.c KVM: arm64: Return guest memory from EL2 via dedicated teardown memcache 2022-11-11 17:18:58 +00:00
pmu-emul.c KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU 2023-03-13 18:05:57 +00:00
pmu.c KVM: arm64: Pass pmu events to hyp via vcpu 2022-05-15 11:26:41 +01:00
psci.c Merge branch kvm-arm64/psci-suspend into kvmarm-master/next 2022-05-16 17:48:20 +01:00
pvtime.c KVM: MMU: Make the definition of 'INVALID_GPA' common 2023-01-19 21:48:38 +00:00
reset.c Merge branch kvm-arm64/nv-prefix into kvmarm/next 2023-02-13 23:33:41 +00:00
stacktrace.c arm64: stacktrace: track hyp stacks in unwinder's address space 2022-09-09 12:30:08 +01:00
sys_regs.c KVM: arm64: PMU: Fix GET_ONE_REG for vPMC regs to return the current value 2023-03-13 18:05:40 +00:00
sys_regs.h KVM: arm64: nv: Allow a sysreg to be hidden from userspace only 2023-02-11 10:13:29 +00:00
trace.h
trace_arm.h KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
trace_handle_exit.h KVM: arm64: Upgrade trace_kvm_arm_set_dreg32() to 64bit 2021-08-20 11:12:18 +01:00
trng.c KVM: arm64: Implement the TRNG hypervisor call 2021-01-25 22:19:31 +00:00
va_layout.c arm64: alternatives: kvm: prepare for cap changes 2022-09-16 17:15:02 +01:00
vgic-sys-reg-v3.c KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP 2022-07-17 11:55:33 +01:00
vmid.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00