Message ID | 20200506082110.25441-1-weijiang.yang@intel.com (mailing list archive) |
---|---|
Headers | show |
Series | Introduce support for guest CET feature | expand |
On Wed, May 06, 2020 at 04:20:59PM +0800, Yang Weijiang wrote: > Control-flow Enforcement Technology (CET) provides protection against > Return/Jump-Oriented Programming (ROP/JOP) attack. There're two CET > sub-features: Shadow Stack (SHSTK) and Indirect Branch Tracking (IBT). > SHSTK is to prevent ROP programming and IBT is to prevent JOP programming. > > Several parts in KVM have been updated to provide VM CET support, including: > CPUID/XSAVES config, MSR pass-through, user space MSR access interface, > vmentry/vmexit config, nested VM etc. These patches have dependency on CET > kernel patches for xsaves support and CET definitions, e.g., MSR and related > feature flags. > > CET kernel patches are here: > https://lkml.kernel.org/r/20200429220732.31602-1-yu-cheng.yu@intel.com > > v12: > - Fixed a few issues per Sean and Paolo's review feeback. > - Refactored patches to make them properly arranged. > - Removed unnecessary hard-coded CET states for host/guest. > - Added compile-time assertions for vmcs_field_to_offset_table to detect > mismatch of the field type and field encoding number. > - Added a custom MSR MSR_KVM_GUEST_SSP for guest active SSP save/restore. > - Rebased patches to 5.7-rc3. > ping... Sean and Paolo, Could you review v12 at your convenience? Thank you!
On Mon, May 18, 2020 at 04:42:32PM +0800, Yang Weijiang wrote: > On Wed, May 06, 2020 at 04:20:59PM +0800, Yang Weijiang wrote: > > Control-flow Enforcement Technology (CET) provides protection against > > Return/Jump-Oriented Programming (ROP/JOP) attack. There're two CET > > sub-features: Shadow Stack (SHSTK) and Indirect Branch Tracking (IBT). > > SHSTK is to prevent ROP programming and IBT is to prevent JOP programming. > > > > Several parts in KVM have been updated to provide VM CET support, including: > > CPUID/XSAVES config, MSR pass-through, user space MSR access interface, > > vmentry/vmexit config, nested VM etc. These patches have dependency on CET > > kernel patches for xsaves support and CET definitions, e.g., MSR and related > > feature flags. > > > > CET kernel patches are here: > > https://lkml.kernel.org/r/20200429220732.31602-1-yu-cheng.yu@intel.com > > > > v12: > > - Fixed a few issues per Sean and Paolo's review feeback. > > - Refactored patches to make them properly arranged. > > - Removed unnecessary hard-coded CET states for host/guest. > > - Added compile-time assertions for vmcs_field_to_offset_table to detect > > mismatch of the field type and field encoding number. > > - Added a custom MSR MSR_KVM_GUEST_SSP for guest active SSP save/restore. > > - Rebased patches to 5.7-rc3. > > > ping... > > Sean and Paolo, > Could you review v12 at your convenience? Thank you! Through no fault of your own, it'll probably be a few weeks before I get back to your CET series. The kernel enabling doesn't seem like it's going to be merged anytime soon, certainly not for 5.8, so unfortunately your series got put on the backburner. Sorry :-(.
On Wed, May 06, 2020 at 04:20:59PM +0800, Yang Weijiang wrote: > Several parts in KVM have been updated to provide VM CET support, including: > CPUID/XSAVES config, MSR pass-through, user space MSR access interface, > vmentry/vmexit config, nested VM etc. These patches have dependency on CET > kernel patches for xsaves support and CET definitions, e.g., MSR and related > feature flags. Other than the MSR and cpufeatures flags definitions, is there any direct dependency on kernel CET support? I.e. if/when XSAVES support is merged, is there anything beyond the architectural definitions that are required to merge KVM CET virtualization?
On Wed, Jun 10, 2020 at 09:56:36AM -0700, Sean Christopherson wrote: > On Wed, May 06, 2020 at 04:20:59PM +0800, Yang Weijiang wrote: > > Several parts in KVM have been updated to provide VM CET support, including: > > CPUID/XSAVES config, MSR pass-through, user space MSR access interface, > > vmentry/vmexit config, nested VM etc. These patches have dependency on CET > > kernel patches for xsaves support and CET definitions, e.g., MSR and related > > feature flags. > > Other than the MSR and cpufeatures flags definitions, is there any direct > dependency on kernel CET support? I.e. if/when XSAVES support is merged, > is there anything beyond the architectural definitions that are required to > merge KVM CET virtualization? No, KVM CET patches only depend on kernel CET related definitions and XSAVES support now. But to make guest CET work, we need CET patches for QEMU.
On Thu, Jun 11, 2020 at 09:29:13AM +0800, Yang Weijiang wrote: > On Wed, Jun 10, 2020 at 09:56:36AM -0700, Sean Christopherson wrote: > > On Wed, May 06, 2020 at 04:20:59PM +0800, Yang Weijiang wrote: > > > Several parts in KVM have been updated to provide VM CET support, including: > > > CPUID/XSAVES config, MSR pass-through, user space MSR access interface, > > > vmentry/vmexit config, nested VM etc. These patches have dependency on CET > > > kernel patches for xsaves support and CET definitions, e.g., MSR and related > > > feature flags. > > > > Other than the MSR and cpufeatures flags definitions, is there any direct > > dependency on kernel CET support? I.e. if/when XSAVES support is merged, > > is there anything beyond the architectural definitions that are required to > > merge KVM CET virtualization? > No, KVM CET patches only depend on kernel CET related definitions and XSAVES > support now. Neato. > But to make guest CET work, we need CET patches for QEMU. Ya, but we don't need to wait for host kernel support, which was the crux of my question. Can you please respin this series with the CET definition patches included? The XSAVES support has been queued to tip/x86/fpu. Assuming that lands in kernel 5.9, I _think_ KVM support for CET can land in 5.10. Base your series on kvm/queue, i.e. don't worry about the XSAVES patches, I'll merge them in from tip/x86/fpu for testing. Thanks!
On Tue, Jun 23, 2020 at 11:39:19AM -0700, Sean Christopherson wrote: > On Thu, Jun 11, 2020 at 09:29:13AM +0800, Yang Weijiang wrote: > > On Wed, Jun 10, 2020 at 09:56:36AM -0700, Sean Christopherson wrote: > > > On Wed, May 06, 2020 at 04:20:59PM +0800, Yang Weijiang wrote: > > > > Several parts in KVM have been updated to provide VM CET support, including: > > > > CPUID/XSAVES config, MSR pass-through, user space MSR access interface, > > > > vmentry/vmexit config, nested VM etc. These patches have dependency on CET > > > > kernel patches for xsaves support and CET definitions, e.g., MSR and related > > > > feature flags. > > > > > > Other than the MSR and cpufeatures flags definitions, is there any direct > > > dependency on kernel CET support? I.e. if/when XSAVES support is merged, > > > is there anything beyond the architectural definitions that are required to > > > merge KVM CET virtualization? > > No, KVM CET patches only depend on kernel CET related definitions and XSAVES > > support now. > > Neato. > > > But to make guest CET work, we need CET patches for QEMU. > > Ya, but we don't need to wait for host kernel support, which was the crux of > my question. > > > Can you please respin this series with the CET definition patches included? > The XSAVES support has been queued to tip/x86/fpu. Assuming that lands in > kernel 5.9, I _think_ KVM support for CET can land in 5.10. Sure. Besides this change and the unrestricted guest case change, any other changes I should do to v12 patch? Thanks for review! > > Base your series on kvm/queue, i.e. don't worry about the XSAVES patches, > I'll merge them in from tip/x86/fpu for testing. > > Thanks!