Skip to content

Commit a0e2dab

Browse files
pa1guptahansendc
authored andcommitted
x86/entry_32: Add VERW just before userspace transition
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@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20240213-delay-verw-v8-3-a6216d83edb7%40linux.intel.com
1 parent 3c75017 commit a0e2dab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/entry/entry_32.S

+3
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ SYM_FUNC_START(entry_SYSENTER_32)
885885
BUG_IF_WRONG_CR3 no_user_check=1
886886
popfl
887887
popl %eax
888+
CLEAR_CPU_BUFFERS
888889

889890
/*
890891
* Return back to the vDSO, which will pop ecx and edx.
@@ -954,6 +955,7 @@ restore_all_switch_stack:
954955

955956
/* Restore user state */
956957
RESTORE_REGS pop=4 # skip orig_eax/error_code
958+
CLEAR_CPU_BUFFERS
957959
.Lirq_return:
958960
/*
959961
* ARCH_HAS_MEMBARRIER_SYNC_CORE rely on IRET core serialization
@@ -1146,6 +1148,7 @@ SYM_CODE_START(asm_exc_nmi)
11461148

11471149
/* Not on SYSENTER stack. */
11481150
call exc_nmi
1151+
CLEAR_CPU_BUFFERS
11491152
jmp .Lnmi_return
11501153

11511154
.Lnmi_from_sysenter_stack:

0 commit comments

Comments
 (0)