Re: [PATCH v4 1/5] KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 21, 2022, Aaron Lewis wrote:
> 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 <seanjc@xxxxxxxxxx>
> Signed-off-by: Aaron Lewis <aaronlewis@xxxxxxxxxx>
> ---

Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>

> Google's VMM is already using this flag, so we *know* that dropping the
> flag entirely will break userspace.  All we can do at this point is
> prevent the kernel from using it.

LOL, nice.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux