linux/arch/arm64
Fuad Tabba 244acf1976 KVM: arm64: Fix vma_shift staleness on nested hwpoison path
When user_mem_abort() handles a nested stage-2 fault, it truncates
vma_pagesize to respect the guest's mapping size. However, the local
variable vma_shift is never updated to match this new size.

If the underlying host page turns out to be hardware poisoned,
kvm_send_hwpoison_signal() is called with the original, larger
vma_shift instead of the actual mapping size. This signals incorrect
poison boundaries to userspace and breaks hugepage memory poison
containment for nested VMs.

Update vma_shift to match the truncated vma_pagesize when operating
on behalf of a nested hypervisor.

Fixes: fd276e71d1 ("KVM: arm64: nv: Handle shadow stage 2 page faults")
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260304162222.836152-3-tabba@google.com
[maz: simplified vma_shift assignment from the original patch]
Signed-off-by: Marc Zyngier <maz@kernel.org>
2026-03-06 10:42:02 +00:00
..
boot soc: devicetree updates for 7.0 2026-02-10 21:11:08 -08:00
configs soc: defconfig updates for 7.0 2026-02-10 20:44:10 -08:00
crypto crypto: arm64/ghash - Use new AES library API 2026-01-15 14:09:08 -08:00
hyperv arm64, x86: hyperv: Report the VTL the system boots in 2025-05-23 16:30:55 +00:00
include Arm: 2026-03-01 15:34:47 -08:00
kernel arm64: topology: Fix false warning in counters_read_on_cpu() for same-CPU reads 2026-02-26 18:27:15 +00:00
kvm KVM: arm64: Fix vma_shift staleness on nested hwpoison path 2026-03-06 10:42:02 +00:00
lib arm64: Fix sampling the "stable" virtual counter in preemptible section 2026-02-26 18:12:48 +00:00
mm arm64: gcs: Honour mprotect(PROT_NONE) on shadow stack mappings 2026-02-25 19:53:58 +00:00
net bpf, arm64: Force 8-byte alignment for JIT buffer to prevent atomic tearing 2026-02-26 11:19:00 -08:00
tools Loongarch: 2026-02-13 11:31:15 -08:00
xen xen/arm: call uaccess_ttbr0_enable for dm_op hypercall 2025-05-23 07:10:02 +02:00
Kbuild arm64: Disable branch profiling for all arm64 code 2026-01-08 21:46:01 +00:00
Kconfig mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
Kconfig.debug
Kconfig.platforms soc: devicetree updates for 7.0 2026-02-10 21:11:08 -08:00
Makefile arm64: drop binutils version checks 2025-04-30 21:55:06 +02:00