mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: x86/urgent] x86/entry_32: Add VERW just before userspace transition
@ 2024-02-20  1:02 tip-bot2 for Pawan Gupta
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Pawan Gupta @ 2024-02-20  1:02 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Pawan Gupta, Dave Hansen, x86, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     a0e2dab44d22b913b4c228c8b52b2a104434b0b3
Gitweb:        https://git.kernel.org/tip/a0e2dab44d22b913b4c228c8b52b2a104434b0b3
Author:        Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
AuthorDate:    Tue, 13 Feb 2024 18:22:08 -08:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Mon, 19 Feb 2024 16:31:46 -08:00

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
---
 arch/x86/entry/entry_32.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index c73047b..fba4276 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -885,6 +885,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.
@@ -954,6 +955,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
@@ -1146,6 +1148,7 @@ SYM_CODE_START(asm_exc_nmi)
 
 	/* Not on SYSENTER stack. */
 	call	exc_nmi
+	CLEAR_CPU_BUFFERS
 	jmp	.Lnmi_return
 
 .Lnmi_from_sysenter_stack:

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [tip: x86/urgent] x86/entry_32: Add VERW just before userspace transition
@ 2024-02-12 18:32 tip-bot2 for Pawan Gupta
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Pawan Gupta @ 2024-02-12 18:32 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Pawan Gupta, Dave Hansen, x86, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     a67d262a840e0cc2daf4b55940f4a318b831d911
Gitweb:        https://git.kernel.org/tip/a67d262a840e0cc2daf4b55940f4a318b831d911
Author:        Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
AuthorDate:    Sun, 04 Feb 2024 23:19:33 -08:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Mon, 12 Feb 2024 10:25:22 -08:00

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/20240204-delay-verw-v7-3-59be2d704cb2%40linux.intel.com
---
 arch/x86/entry/entry_32.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index c73047b..fba4276 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -885,6 +885,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.
@@ -954,6 +955,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
@@ -1146,6 +1148,7 @@ SYM_CODE_START(asm_exc_nmi)
 
 	/* Not on SYSENTER stack. */
 	call	exc_nmi
+	CLEAR_CPU_BUFFERS
 	jmp	.Lnmi_return
 
 .Lnmi_from_sysenter_stack:

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

end of thread, other threads:[~2024-02-20  1:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20  1:02 [tip: x86/urgent] x86/entry_32: Add VERW just before userspace transition tip-bot2 for Pawan Gupta
  -- strict thread matches above, loose matches on Subject: below --
2024-02-12 18:32 tip-bot2 for Pawan Gupta

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

all inboxes | Powered by JetHome®