public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.7.y v2 0/5] Delay VERW - 6.7.y backport
@ 2024-03-04  4:24 Pawan Gupta
  2024-03-04  4:24 ` [PATCH 6.7.y v2 1/5] x86/entry_64: Add VERW just before userspace transition Pawan Gupta
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Pawan Gupta @ 2024-03-04  4:24 UTC (permalink / raw)
  To: stable; +Cc: Dave Hansen, Dave Hansen, Sean Christopherson, Nikolay Borisov

v2:
- Dropped already backported patch "x86/bugs: Add asm helpers for
  executing VERW".
  https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.7.8&id=09b0b1a090b74c9b453f9281e72289834c1a3dbb
- Boot tested with KASLR and KPTI enabled.
- Rebased to v6.7.8

v1: https://lore.kernel.org/r/20240226-delay-verw-backport-6-7-y-v1-0-ab25f643173b@linux.intel.com

This is the backport of recently upstreamed series that moves VERW
execution to a later point in exit-to-user path. This is needed because
in some cases it may be possible for data accessed after VERW executions
may end into MDS affected CPU buffers. Moving VERW closer to ring
transition reduces the attack surface.

Patch 2/7: A conflict was resolved for the hunk
           swapgs_restore_regs_and_return_to_usermode.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
---
Pawan Gupta (4):
      x86/entry_64: Add VERW just before userspace transition
      x86/entry_32: Add VERW just before userspace transition
      x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key
      KVM/VMX: Move VERW closer to VMentry for MDS mitigation

Sean Christopherson (1):
      KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH

 Documentation/arch/x86/mds.rst       | 38 +++++++++++++++++++++++++-----------
 arch/x86/entry/entry_32.S            |  3 +++
 arch/x86/entry/entry_64.S            | 11 +++++++++++
 arch/x86/entry/entry_64_compat.S     |  1 +
 arch/x86/include/asm/entry-common.h  |  1 -
 arch/x86/include/asm/nospec-branch.h | 12 ------------
 arch/x86/kernel/cpu/bugs.c           | 15 ++++++--------
 arch/x86/kernel/nmi.c                |  3 ---
 arch/x86/kvm/vmx/run_flags.h         |  7 +++++--
 arch/x86/kvm/vmx/vmenter.S           |  9 ++++++---
 arch/x86/kvm/vmx/vmx.c               | 20 +++++++++++++++----
 11 files changed, 75 insertions(+), 45 deletions(-)
---
base-commit: d6d6c49dbf4512f1421f5e42896e2d70dc121f9a
change-id: 20240226-delay-verw-backport-6-7-y-a2cb3f26bb90

Best regards,
-- 
Thanks,
Pawan



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-04 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04  4:24 [PATCH 6.7.y v2 0/5] Delay VERW - 6.7.y backport Pawan Gupta
2024-03-04  4:24 ` [PATCH 6.7.y v2 1/5] x86/entry_64: Add VERW just before userspace transition Pawan Gupta
2024-03-04  4:24 ` [PATCH 6.7.y v2 2/5] x86/entry_32: " Pawan Gupta
2024-03-04  4:24 ` [PATCH 6.7.y v2 3/5] x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key Pawan Gupta
2024-03-04  4:24 ` [PATCH 6.7.y v2 4/5] KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH Pawan Gupta
2024-03-04  4:24 ` [PATCH 6.7.y v2 5/5] KVM/VMX: Move VERW closer to VMentry for MDS mitigation Pawan Gupta
2024-03-04 13:29 ` [PATCH 6.7.y v2 0/5] Delay VERW - 6.7.y backport Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox