]> www.infradead.org Git - users/dwmw2/linux.git/commit
arm64: KVM: Sanitize PSTATE.M when being set from userspace
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 27 Sep 2018 15:53:22 +0000 (16:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:27 +0000 (16:59 -0700)
commit926415e1e4c94e452a258eeddad18db8d66a69cc
tree53f3e9cb6183d719e0d7b6878b66fbc8d75551d1
parent5fddc4cd7aecaaa13bafd20dda499eb7248d3273
arm64: KVM: Sanitize PSTATE.M when being set from userspace

commit 2a3f93459d689d990b3ecfbe782fec89b97d3279 upstream.

Not all execution modes are valid for a guest, and some of them
depend on what the HW actually supports. Let's verify that what
userspace provides is compatible with both the VM settings and
the HW capabilities.

Cc: <stable@vger.kernel.org>
Fixes: 0d854a60b1d7 ("arm64: KVM: enable initialization of a 32bit vcpu")
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kvm/guest.c