linux/arch/arm64/kvm
Zenghui Yu 522c9a64c7 KVM: arm64: Use kmemleak_free_part_phys() to unregister hyp_mem_base
With commit 0c24e06119 ("mm: kmemleak: add rbtree and store physical
address for objects allocated with PA"), kmemleak started to put the
objects allocated with physical address onto object_phys_tree_root tree.
The kmemleak_free_part() therefore no longer worked as expected on
physically allocated objects (hyp_mem_base in this case) as it attempted to
search and remove things in object_tree_root tree.

Fix it by using kmemleak_free_part_phys() to unregister hyp_mem_base. This
fixes an immediate crash when booting a KVM host in protected mode with
kmemleak enabled.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220908130659.2021-1-yuzenghui@huawei.com
2022-09-19 17:59:48 +01:00
..
hyp asm-generic: updates for 6.0 2022-08-05 10:07:23 -07:00
vgic KVM: arm64: vgic: Tidy-up calls to vgic_{get,set}_common_attr() 2022-07-17 11:55:33 +01:00
.gitignore KVM: arm64: Generate hyp_constants.h for the host 2021-12-06 08:37:03 +00:00
arch_timer.c Merge branch kvm-arm64/burn-the-flags into kvmarm-master/next 2022-06-29 10:30:10 +01:00
arm.c KVM: arm64: Use kmemleak_free_part_phys() to unregister hyp_mem_base 2022-09-19 17:59:48 +01:00
debug.c KVM: arm64: Move vcpu debug/SPE/TRBE flags to the input flag set 2022-06-29 10:23:03 +01:00
fpsimd.c KVM: arm64: Move the handling of !FP outside of the fast path 2022-06-29 10:23:56 +01:00
guest.c KVM: arm64: Reject 32bit user PSTATE on asymmetric systems 2022-08-17 10:29:07 +01:00
handle_exit.c Merge branch kvm-arm64/nvhe-stacktrace into kvmarm-master/next 2022-07-27 18:33:27 +01:00
hypercalls.c KVM: arm64: Fix hypercall bitmap writeback when vcpus have already run 2022-05-16 17:40:48 +01:00
inject_fault.c KVM: arm64: Move vcpu PC/Exception flags to the input flag set 2022-06-10 09:54:34 +01:00
irq.h
Kconfig KVM: arm64: Move PROTECTED_NVHE_STACKTRACE around 2022-07-27 18:18:03 +01:00
Makefile KVM: arm64: Move nVHE stacktrace unwinding into its own compilation unit 2022-07-27 18:18:03 +01:00
mmio.c KVM: arm64: Generalise VM features into a set of flags 2022-03-18 14:02:33 +00:00
mmu.c KVM: Rename mmu_notifier_* to mmu_invalidate_* 2022-08-19 04:05:41 -04:00
pkvm.c KVM: arm64: Move host EL1 code out of hyp/ directory 2021-12-06 08:37:03 +00:00
pmu-emul.c Merge branch kvm-arm64/per-vcpu-host-pmu-data into kvmarm-master/next 2022-05-16 17:48:36 +01: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: arm64: Use kvm_write_guest_lock when init stolen time 2020-12-03 19:02:18 +00:00
reset.c KVM: arm64: Move vcpu configuration flags into their own set 2022-06-09 15:43:46 +01:00
stacktrace.c KVM: arm64: Don't open code ARRAY_SIZE() 2022-07-27 18:18:38 +01:00
sys_regs.c KVM/arm64 fixes for 6.0, take #1 2022-08-19 05:43:53 -04:00
sys_regs.h KVM: arm64: Descope kvm_arm_sys_reg_{get,set}_reg() 2022-07-17 11:55:33 +01:00
trace_arm.h KVM: Move arm64's MMU notifier trace events to generic code 2021-04-17 08:30:56 -04:00
trace_handle_exit.h KVM: arm64: Upgrade trace_kvm_arm_set_dreg32() to 64bit 2021-08-20 11:12:18 +01:00
trace.h
trng.c KVM: arm64: Implement the TRNG hypervisor call 2021-01-25 22:19:31 +00:00
va_layout.c KVM: arm64: Generate final CTR_EL0 value when running in Protected mode 2021-03-25 11:00:33 +00: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: arm64: Fix inconsistent indenting 2022-06-07 15:27:05 +01:00