[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: cfceff8526a426948b53445c02bcb98453c7330d
Status in newer kernel trees: 6.14.y | Present (different SHA1: 010c4a461c1d) 6.12.y | Present (different SHA1: e15232fbbe9b) 6.6.y | Present (different SHA1: af0a7b28d776) 6.1.y | Present (different SHA1: e6b48a590f7f)
Note: The patch differs from the upstream commit: --- 1: cfceff8526a42 ! 1: 0851139dfb8e2 x86/speculation: Simplify and make CALL_NOSPEC consistent @@ Metadata ## Commit message ## x86/speculation: Simplify and make CALL_NOSPEC consistent
+ commit cfceff8526a426948b53445c02bcb98453c7330d upstream. + CALL_NOSPEC macro is used to generate Spectre-v2 mitigation friendly indirect branches. At compile time the macro defaults to indirect branch, and at runtime those can be patched to thunk based mitigations. @@ Commit message calls.
Make CALL_NOSPEC consistent with the rest of the kernel, default to - retpoline thunk at compile time when CONFIG_MITIGATION_RETPOLINE is + retpoline thunk at compile time when CONFIG_RETPOLINE is enabled.
+ [ pawan: s/CONFIG_MITIGATION_RETPOLINE/CONFIG_RETPOLINE/ ] + Signed-off-by: Pawan Gupta pawan.kumar.gupta@linux.intel.com Signed-off-by: Ingo Molnar mingo@kernel.org Cc: Andrew Cooper <andrew.cooper3@citrix.com @@ Commit message Link: https://lore.kernel.org/r/20250228-call-nospec-v3-1-96599fed0f33@linux.intel...
## arch/x86/include/asm/nospec-branch.h ## -@@ arch/x86/include/asm/nospec-branch.h: static inline void call_depth_return_thunk(void) {} +@@ arch/x86/include/asm/nospec-branch.h: extern retpoline_thunk_t __x86_indirect_thunk_array[]; * Inline asm uses the %V modifier which is only in newer GCC - * which is ensured when CONFIG_MITIGATION_RETPOLINE is defined. + * which is ensured when CONFIG_RETPOLINE is defined. */ -# define CALL_NOSPEC \ - ALTERNATIVE_2( \ @@ arch/x86/include/asm/nospec-branch.h: static inline void call_depth_return_thunk - ANNOTATE_RETPOLINE_SAFE \ - "call *%[thunk_target]\n", \ - X86_FEATURE_RETPOLINE_LFENCE) -+#ifdef CONFIG_MITIGATION_RETPOLINE ++#ifdef CONFIG_RETPOLINE +#define CALL_NOSPEC "call __x86_indirect_thunk_%V[thunk_target]\n" +#else +#define CALL_NOSPEC "call *%[thunk_target]\n" ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |