Skip to content

Commit 1c0513d

Browse files
jpoimboePeter Zijlstra
authored andcommitted
x86/retpoline: Add ANNOTATE_NOENDBR for retpolines
The retpolines are exported, so they're referenced by ksymtab sections. But they're never indirect-branched to, so add ANNOTATE_NOENDBR. Fixes: ed53a0d ("x86/alternative: Use .ibt_endbr_seal to seal indirect calls") Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/b6ec963dfd9301b6b1d74ef7758fcb0b540d6c6c.1650300597.git.jpoimboe@redhat.com
1 parent 613871c commit 1c0513d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/lib/retpoline.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
.align RETPOLINE_THUNK_SIZE
3232
SYM_INNER_LABEL(__x86_indirect_thunk_\reg, SYM_L_GLOBAL)
3333
UNWIND_HINT_EMPTY
34+
ANNOTATE_NOENDBR
3435

3536
ALTERNATIVE_2 __stringify(ANNOTATE_RETPOLINE_SAFE; jmp *%\reg), \
3637
__stringify(RETPOLINE \reg), X86_FEATURE_RETPOLINE, \
@@ -55,7 +56,6 @@ SYM_INNER_LABEL(__x86_indirect_thunk_\reg, SYM_L_GLOBAL)
5556

5657
.align RETPOLINE_THUNK_SIZE
5758
SYM_CODE_START(__x86_indirect_thunk_array)
58-
ANNOTATE_NOENDBR // apply_retpolines
5959

6060
#define GEN(reg) THUNK reg
6161
#include <asm/GEN-for-each-reg.h>

0 commit comments

Comments
 (0)