]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 16 Jan 2018 10:23:47 +0000 (10:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:46:13 +0000 (14:46 +0100)
commit0e88a123df05b3254dcba42ab857a1ed63c46ff3
treef4b16e5fe2fd87407dc308e3bc731688083e0241
parent7ed7a1ce7e03214e3c98998c36f99034fb8f6575
arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls

commit acfb3b883f6d6a4b5d27ad7fdded11f6a09ae6dd upstream.

KVM doesn't follow the SMCCC when it comes to unimplemented calls,
and inject an UNDEF instead of returning an error. Since firmware
calls are now used for security mitigation, they are becoming more
common, and the undef is counter productive.

Instead, let's follow the SMCCC which states that -1 must be returned
to the caller when getting an unknown function number.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kvm/handle_exit.c