]> Git Repo - linux.git/commit
KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel
authorAaron Lewis <[email protected]>
Wed, 21 Sep 2022 15:15:21 +0000 (15:15 +0000)
committerPaolo Bonzini <[email protected]>
Wed, 9 Nov 2022 17:31:28 +0000 (12:31 -0500)
commitbe83794210e7020fef98596f4513aafbed659cd1
treeddc0818bfb1a12fa1ef9f7cd3715002bea7c1cc9
parent766576874b9732ad6a65595296de351c064b4c0b
KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel

Protect the kernel from using the flag KVM_MSR_FILTER_DEFAULT_ALLOW.
Its value is 0, and using it incorrectly could have unintended
consequences. E.g. prevent someone in the kernel from writing something
like this.

if (filter.flags & KVM_MSR_FILTER_DEFAULT_ALLOW)
        <allow the MSR>

and getting confused when it doesn't work.

It would be more ideal to remove this flag altogether, but userspace
may already be using it, so protecting the kernel is all that can
reasonably be done at this point.

Suggested-by: Sean Christopherson <[email protected]>
Signed-off-by: Aaron Lewis <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Message-Id: <20220921151525[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/include/uapi/asm/kvm.h
This page took 0.0493 seconds and 4 git commands to generate.