Skip to contentSkip to conversation

Patch "KVM: arm64: nv: Add sanitising to VNCR-backed sysregs" has been added to the 6.8-stable tree

DISCUSSION Marc Zyngier 1 participant 1 message Jun 3, 2024 1 message not in the archive Stable branch

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 36 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

KVM: arm64: nv: Add sanitising to VNCR-backed sysregs

to the 6.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kvm-arm64-nv-add-sanitising-to-vncr-backed-sysregs.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit fbb2bcdc458dd7db3860f85a06e98cc25904d20d

Author: Marc Zyngier <[email protected]>
Date:   Wed Feb 14 13:18:04 2024 +0000

KVM: arm64: nv: Add sanitising to VNCR-backed sysregs

[ Upstream commit 888f0880702293096619b300150cd7e59fcd9743 ]

VNCR-backed "registers" are actually only memory. Which means that there is zero control over what the guest can write, and that it is the hypervisor's job to actually sanitise the content of the backing store. Yeah, this is fun.

In order to preserve some form of sanity, add a repainting mechanism that makes use of a per-VM set of RES0/RES1 masks, one pair per VNCR register. These masks get applied on access to the backing store via __vcpu_sys_reg(), ensuring that the state that is consumed by KVM is correct.

Quoted 8 lines

So far, nothing populates these masks, but stay tuned.

Stable-dep-of: ce5d2448eb8f ("KVM: arm64: Destroy mpidr_data for 'late' vCPU creation")

Please drop this. It serves no purpose on 6.8 aside from wasting memory. If backporting ce5d2448eb8f is hard due to some conflicts, we'll tackle it ourselves.

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.