KVM: arm64: PSCI: Narrow input registers when using 32bit functions
authorMarc Zyngier <maz@kernel.org>
Wed, 1 Apr 2020 11:25:05 +0000 (12:25 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 17 Apr 2020 08:51:45 +0000 (09:51 +0100)
commit2890ac993daa7bdcc57a92da2f07bcdec243666b
tree3de85579ff6aec6ef51dc586435aa9bb2febc0db
parent8f3d9f354286745c751374f5f1fcafee6b3f3136
KVM: arm64: PSCI: Narrow input registers when using 32bit functions

When a guest delibarately uses an SMC32 function number (which is allowed),
we should make sure we drop the top 32bits from the input arguments, as they
could legitimately be junk.

Reported-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
virt/kvm/arm/psci.c