]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commiteddc67847416228b0bbb83d855a6a0ea61788cf9
tree3de85579ff6aec6ef51dc586435aa9bb2febc0db
parent0e6c92ce1d170795a396f8108369eb2c8412797f
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