Skip to content

Commit ed3bf86

Browse files
jpoimboeingomolnar
authored andcommitted
objtool: Remove newlines and tabs from annotation macros
Remove newlines and tabs from the annotation macros so the invoking code can insert them as needed to match the style of the surrounding code. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://patch.msgid.link/66305834c2eb78f082217611b756231ae9c0b555.1764694625.git.jpoimboe@kernel.org
1 parent 305c8dc commit ed3bf86

15 files changed

Lines changed: 23 additions & 23 deletions

File tree

arch/x86/include/asm/alternative.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
208208

209209
#define ALTINSTR_REPLACEMENT(newinstr) /* replacement */ \
210210
".pushsection .altinstr_replacement, \"ax\"\n" \
211-
ANNOTATE_DATA_SPECIAL \
211+
ANNOTATE_DATA_SPECIAL "\n" \
212212
"# ALT: replacement\n" \
213213
"774:\n\t" newinstr "\n775:\n" \
214214
".popsection\n"

arch/x86/include/asm/bug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);
7070

7171
#define _BUG_FLAGS_ASM(format, file, line, flags, size, extra) \
7272
".pushsection __bug_table,\"aw\"\n\t" \
73-
ANNOTATE_DATA_SPECIAL \
73+
ANNOTATE_DATA_SPECIAL "\n\t" \
7474
"2:\n\t" \
7575
__BUG_ENTRY(format, file, line, flags) \
7676
"\t.org 2b + " size "\n" \

arch/x86/include/asm/cpufeature.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static __always_inline bool _static_cpu_has(u16 bit)
101101
asm goto(ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]")
102102
".pushsection .altinstr_aux,\"ax\"\n"
103103
"6:\n"
104-
ANNOTATE_DATA_SPECIAL
104+
ANNOTATE_DATA_SPECIAL "\n"
105105
" testb %[bitnum], %a[cap_byte]\n"
106106
" jnz %l[t_yes]\n"
107107
" jmp %l[t_no]\n"

arch/x86/include/asm/irq_stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
#define ASM_CALL_ARG0 \
103103
"1: call %c[__func] \n" \
104-
ANNOTATE_REACHABLE(1b)
104+
ANNOTATE_REACHABLE(1b) " \n"
105105

106106
#define ASM_CALL_ARG1 \
107107
"movq %[arg1], %%rdi \n" \

arch/x86/include/asm/jump_label.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define JUMP_TABLE_ENTRY(key, label) \
1616
".pushsection __jump_table, \"aw\" \n\t" \
1717
_ASM_ALIGN "\n\t" \
18-
ANNOTATE_DATA_SPECIAL \
18+
ANNOTATE_DATA_SPECIAL "\n" \
1919
".long 1b - . \n\t" \
2020
".long " label " - . \n\t" \
2121
_ASM_PTR " " key " - . \n\t" \

arch/x86/include/asm/nospec-branch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static inline void call_depth_return_thunk(void) {}
464464
*/
465465
# define CALL_NOSPEC \
466466
ALTERNATIVE_2( \
467-
ANNOTATE_RETPOLINE_SAFE \
467+
ANNOTATE_RETPOLINE_SAFE "\n" \
468468
"call *%[thunk_target]\n", \
469469
" jmp 904f;\n" \
470470
" .align 16\n" \
@@ -480,7 +480,7 @@ static inline void call_depth_return_thunk(void) {}
480480
"904: call 901b;\n", \
481481
X86_FEATURE_RETPOLINE, \
482482
"lfence;\n" \
483-
ANNOTATE_RETPOLINE_SAFE \
483+
ANNOTATE_RETPOLINE_SAFE "\n" \
484484
"call *%[thunk_target]\n", \
485485
X86_FEATURE_RETPOLINE_LFENCE)
486486

arch/x86/include/asm/paravirt_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ extern struct paravirt_patch_template pv_ops;
249249
* don't need to bother with CFI prefixes.
250250
*/
251251
#define PARAVIRT_CALL \
252-
ANNOTATE_RETPOLINE_SAFE \
252+
ANNOTATE_RETPOLINE_SAFE "\n\t" \
253253
"call *%[paravirt_opptr];"
254254

255255
/*

arch/x86/include/asm/smap.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static __always_inline unsigned long smap_save(void)
4040
unsigned long flags;
4141

4242
asm volatile ("# smap_save\n\t"
43-
ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE
43+
ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t"
4444
"", "pushf; pop %0; clac",
4545
X86_FEATURE_SMAP)
4646
: "=rm" (flags) : : "memory", "cc");
@@ -51,7 +51,7 @@ static __always_inline unsigned long smap_save(void)
5151
static __always_inline void smap_restore(unsigned long flags)
5252
{
5353
asm volatile ("# smap_restore\n\t"
54-
ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE
54+
ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t"
5555
"", "push %0; popf",
5656
X86_FEATURE_SMAP)
5757
: : "g" (flags) : "memory", "cc");
@@ -64,9 +64,9 @@ static __always_inline void smap_restore(unsigned long flags)
6464
ALTERNATIVE("", "stac", X86_FEATURE_SMAP)
6565

6666
#define ASM_CLAC_UNSAFE \
67-
ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "clac", X86_FEATURE_SMAP)
67+
ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "clac", X86_FEATURE_SMAP)
6868
#define ASM_STAC_UNSAFE \
69-
ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "stac", X86_FEATURE_SMAP)
69+
ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "stac", X86_FEATURE_SMAP)
7070

7171
#endif /* __ASSEMBLER__ */
7272

arch/x86/include/asm/static_call.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
".align 4 \n" \
3737
".globl " STATIC_CALL_TRAMP_STR(name) " \n" \
3838
STATIC_CALL_TRAMP_STR(name) ": \n" \
39-
ANNOTATE_NOENDBR \
39+
ANNOTATE_NOENDBR " \n" \
4040
insns " \n" \
4141
".byte 0x0f, 0xb9, 0xcc \n" \
4242
".type " STATIC_CALL_TRAMP_STR(name) ", @function \n" \

arch/x86/kernel/alternative.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ asm (
22292229
" .pushsection .init.text, \"ax\", @progbits\n"
22302230
" .type int3_selftest_asm, @function\n"
22312231
"int3_selftest_asm:\n"
2232-
ANNOTATE_NOENDBR
2232+
ANNOTATE_NOENDBR "\n"
22332233
/*
22342234
* INT3 padded with NOP to CALL_INSN_SIZE. The INT3 triggers an
22352235
* exception, then the int3_exception_nb notifier emulates a call to
@@ -2247,7 +2247,7 @@ asm (
22472247
" .pushsection .init.text, \"ax\", @progbits\n"
22482248
" .type int3_selftest_callee, @function\n"
22492249
"int3_selftest_callee:\n"
2250-
ANNOTATE_NOENDBR
2250+
ANNOTATE_NOENDBR "\n"
22512251
" movl $0x1234, (%" _ASM_ARG1 ")\n"
22522252
ASM_RET
22532253
" .size int3_selftest_callee, . - int3_selftest_callee\n"

0 commit comments

Comments
 (0)