]> git.baikalelectronics.ru Git - kernel.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)
committerWill Deacon <will.deacon@arm.com>
Mon, 1 Oct 2018 13:38:26 +0000 (14:38 +0100)
commit03404dc8f9a49311d416d3556b65be95f45d7e5f
treefe727ff9274645032d41c463d5c3593b4760f1dd
parent85e666bfc37d097581ca9d0011fb775f6f503cc0
arm64: KVM: Sanitize PSTATE.M when being set from userspace

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: 1c22988b42e5 ("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>
arch/arm64/kvm/guest.c