This is a note to let you know that I've just added the patch titled x86/entry_32: Add VERW just before userspace transition to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: x86-entry_32-add-verw-just-before-userspace-transition.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From stable+bounces-25866-greg=kroah.com@xxxxxxxxxxxxxxx Mon Mar 4 10:26:09 2024 From: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx> Date: Mon, 4 Mar 2024 01:24:05 -0800 Subject: x86/entry_32: Add VERW just before userspace transition To: stable@xxxxxxxxxxxxxxx Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Message-ID: <20240304-delay-verw-backport-6-1-y-v2-3-bf4bce517d60@xxxxxxxxxxxxxxx> Content-Disposition: inline From: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx> commit a0e2dab44d22b913b4c228c8b52b2a104434b0b3 upstream. As done for entry_64, add support for executing VERW late in exit to user path for 32-bit mode. Signed-off-by: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx> Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/all/20240213-delay-verw-v8-3-a6216d83edb7%40linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/entry/entry_32.S | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -912,6 +912,7 @@ SYM_FUNC_START(entry_SYSENTER_32) BUG_IF_WRONG_CR3 no_user_check=1 popfl popl %eax + CLEAR_CPU_BUFFERS /* * Return back to the vDSO, which will pop ecx and edx. @@ -981,6 +982,7 @@ restore_all_switch_stack: /* Restore user state */ RESTORE_REGS pop=4 # skip orig_eax/error_code + CLEAR_CPU_BUFFERS .Lirq_return: /* * ARCH_HAS_MEMBARRIER_SYNC_CORE rely on IRET core serialization @@ -1173,6 +1175,7 @@ SYM_CODE_START(asm_exc_nmi) /* Not on SYSENTER stack. */ call exc_nmi + CLEAR_CPU_BUFFERS jmp .Lnmi_return .Lnmi_from_sysenter_stack: Patches currently in stable-queue which might be from kroah.com@xxxxxxxxxxxxxxx are queue-6.1/x86-bugs-use-alternative-instead-of-mds_user_clear-static-key.patch queue-6.1/x86-decompressor-avoid-magic-offsets-for-efi-handover-entrypoint.patch queue-6.1/x86-efistub-avoid-placing-the-kernel-below-load_physical_addr.patch queue-6.1/x86-efistub-avoid-legacy-decompressor-when-doing-efi-boot.patch queue-6.1/kvm-vmx-move-verw-closer-to-vmentry-for-mds-mitigation.patch queue-6.1/x86-efistub-perform-4-5-level-paging-switch-from-the-stub.patch queue-6.1/x86-entry_32-add-verw-just-before-userspace-transition.patch queue-6.1/x86-boot-rename-conflicting-boot_params-pointer-to-boot_params_ptr.patch queue-6.1/x86-efistub-perform-snp-feature-test-while-running-in-the-firmware.patch queue-6.1/x86-efistub-simplify-and-clean-up-handover-entry-code.patch queue-6.1/efi-libstub-add-memory-attribute-protocol-definitions.patch queue-6.1/x86-entry_64-add-verw-just-before-userspace-transition.patch queue-6.1/efi-libstub-add-limit-argument-to-efi_random_alloc.patch queue-6.1/efi-x86-fix-the-missing-kaslr_flag-bit-in-boot_params-hdr.loadflags.patch queue-6.1/kvm-vmx-use-bt-jnc-i.e.-eflags.cf-to-select-vmresume-vs.-vmlaunch.patch queue-6.1/arm64-efi-limit-allocations-to-48-bit-addressable-physical-region.patch queue-6.1/x86-efistub-prefer-efi-memory-attributes-protocol-over-dxe-services.patch queue-6.1/efi-efivars-prevent-double-registration.patch queue-6.1/x86-boot-efistub-assign-global-boot_params-variable.patch queue-6.1/x86-efistub-clear-bss-in-efi-handover-protocol-entrypoint.patch queue-6.1/x86-decompressor-factor-out-kernel-decompression-and-relocation.patch queue-6.1/efi-x86-avoid-physical-kaslr-on-older-dell-systems.patch queue-6.1/x86-bugs-add-asm-helpers-for-executing-verw.patch