lkml.org 
[lkml]   [2020]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 5/7] KVM: x86: VMX: Prevent MSR passthrough when MSR access is denied
> >
> >> +
> >> /*
> >> * These 2 parameters are used to config the controls for Pause-Loop Exiting:
> >> * ple_gap: upper bound on the amount of time between two successive
> >> @@ -622,6 +642,41 @@ static inline bool report_flexpriority(void)
> >> return flexpriority_enabled;
> >> }
> >
> > One thing that seems to be missing is removing MSRs from the
> > permission bitmap or resetting the permission bitmap to its original
> > state before adding changes on top of it. This would be needed on
> > subsequent calls to kvm_vm_ioctl_set_msr_filter(). When that happens
> > the original changes made by KVM_REQ_MSR_FILTER_CHANGED need to be
> > backed out before applying the new set.
>
> I'm not sure I follow. Subsequent calls to set_msr_filter() will invoke
> the "please reset the whole MSR passthrough bitmap to a consistent
> state" which will then reapply the in-kvm desired state through the
> bitmap and filter state on top on each of those.
>

Yes, you're correct. I discovered this after the fact by adding a
test to the selftest I wrote for the deny list system which I revamped
to work for your filter system. It proved the permission bitmaps are
in fact set as expected on subsequent calls. You can disregard this
comment.

As a side note, I'm happy to share the test if you'd like. I also used
it to uncover an issue in the first commit of this series.

\
 
 \ /
  Last update: 2020-09-16 22:14    [W:0.879 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site