[PATCH v3 0/2] CALL_NOSPEC fixes

From: Pawan Gupta
Date: Fri Feb 28 2025 - 21:35:36 EST


v3:
- Split the CS prefix change into a separate patch. (Ingo)

v2: https://lore.kernel.org/r/20250227-call-nospec-v2-1-895a30dceaac@xxxxxxxxxxxxxxx
- Fixed the inconsistency in the use of "\" in __CS_PREFIX. (Andrew)
- Fixed the comment to reflect that __CS_PREFIX only emits the prefix and
not the JMP/CALL. (Andrew)

v1: https://lore.kernel.org/r/20250226-call-nospec-v1-1-4dde04a5c7a7@xxxxxxxxxxxxxxx

Patch 1 simplifies CALL_NOSPEC and mimics the behavior of compiler induced
thunks.

Patch 2 adds a missing CS prefix in CALL_NOSPEC for inline asm.

---
Pawan Gupta (2):
x86/speculation: Simplify and make CALL_NOSPEC consistent
x86/speculation: Add a conditional CS prefix to CALL_NOSPEC

arch/x86/include/asm/nospec-branch.h | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
---
base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6
change-id: 20250226-call-nospec-b94808f0dc75

Best regards,
--
Pawan