KVM: arm64: Prevent userspace from handling SMC64 arch range
authorOliver Upton <oliver.upton@linux.dev>
Sat, 8 Apr 2023 12:17:31 +0000 (12:17 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 8 Apr 2023 14:22:55 +0000 (15:22 +0100)
commit5a23ad6510c82049f5ab3795841c30e8f3ca324d
treecddc515535bb1ecac4c49508dfa380f26f8f992e
parent0e5c9a9d6548e9b178d4696c696ae4a21c39ae58
KVM: arm64: Prevent userspace from handling SMC64 arch range

Though presently unused, there is an SMC64 view of the Arm architecture
calls defined by the SMCCC. The documentation of the SMCCC filter states
that the SMC64 range is reserved, but nothing actually prevents
userspace from applying a filter to the range.

Insert a range with the HANDLE action for the SMC64 arch range, thereby
preventing userspace from imposing filtering/forwarding on it.

Fixes: fb88707dd39b ("KVM: arm64: Use a maple tree to represent the SMCCC filter")
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230408121732.3411329-2-oliver.upton@linux.dev
arch/arm64/kvm/hypercalls.c