Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Josh Poimboeuf and committed by
Ingo Molnar
ed3bf863 305c8dc4

+23 -23
+1 -1
arch/x86/include/asm/alternative.h
··· 208 208 209 209 #define ALTINSTR_REPLACEMENT(newinstr) /* replacement */ \ 210 210 ".pushsection .altinstr_replacement, \"ax\"\n" \ 211 - ANNOTATE_DATA_SPECIAL \ 211 + ANNOTATE_DATA_SPECIAL "\n" \ 212 212 "# ALT: replacement\n" \ 213 213 "774:\n\t" newinstr "\n775:\n" \ 214 214 ".popsection\n"
+1 -1
arch/x86/include/asm/bug.h
··· 70 70 71 71 #define _BUG_FLAGS_ASM(format, file, line, flags, size, extra) \ 72 72 ".pushsection __bug_table,\"aw\"\n\t" \ 73 - ANNOTATE_DATA_SPECIAL \ 73 + ANNOTATE_DATA_SPECIAL "\n\t" \ 74 74 "2:\n\t" \ 75 75 __BUG_ENTRY(format, file, line, flags) \ 76 76 "\t.org 2b + " size "\n" \
+1 -1
arch/x86/include/asm/cpufeature.h
··· 101 101 asm goto(ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]") 102 102 ".pushsection .altinstr_aux,\"ax\"\n" 103 103 "6:\n" 104 - ANNOTATE_DATA_SPECIAL 104 + ANNOTATE_DATA_SPECIAL "\n" 105 105 " testb %[bitnum], %a[cap_byte]\n" 106 106 " jnz %l[t_yes]\n" 107 107 " jmp %l[t_no]\n"
+1 -1
arch/x86/include/asm/irq_stack.h
··· 101 101 102 102 #define ASM_CALL_ARG0 \ 103 103 "1: call %c[__func] \n" \ 104 - ANNOTATE_REACHABLE(1b) 104 + ANNOTATE_REACHABLE(1b) " \n" 105 105 106 106 #define ASM_CALL_ARG1 \ 107 107 "movq %[arg1], %%rdi \n" \
+1 -1
arch/x86/include/asm/jump_label.h
··· 15 15 #define JUMP_TABLE_ENTRY(key, label) \ 16 16 ".pushsection __jump_table, \"aw\" \n\t" \ 17 17 _ASM_ALIGN "\n\t" \ 18 - ANNOTATE_DATA_SPECIAL \ 18 + ANNOTATE_DATA_SPECIAL "\n" \ 19 19 ".long 1b - . \n\t" \ 20 20 ".long " label " - . \n\t" \ 21 21 _ASM_PTR " " key " - . \n\t" \
+2 -2
arch/x86/include/asm/nospec-branch.h
··· 464 464 */ 465 465 # define CALL_NOSPEC \ 466 466 ALTERNATIVE_2( \ 467 - ANNOTATE_RETPOLINE_SAFE \ 467 + ANNOTATE_RETPOLINE_SAFE "\n" \ 468 468 "call *%[thunk_target]\n", \ 469 469 " jmp 904f;\n" \ 470 470 " .align 16\n" \ ··· 480 480 "904: call 901b;\n", \ 481 481 X86_FEATURE_RETPOLINE, \ 482 482 "lfence;\n" \ 483 - ANNOTATE_RETPOLINE_SAFE \ 483 + ANNOTATE_RETPOLINE_SAFE "\n" \ 484 484 "call *%[thunk_target]\n", \ 485 485 X86_FEATURE_RETPOLINE_LFENCE) 486 486
+1 -1
arch/x86/include/asm/paravirt_types.h
··· 249 249 * don't need to bother with CFI prefixes. 250 250 */ 251 251 #define PARAVIRT_CALL \ 252 - ANNOTATE_RETPOLINE_SAFE \ 252 + ANNOTATE_RETPOLINE_SAFE "\n\t" \ 253 253 "call *%[paravirt_opptr];" 254 254 255 255 /*
+4 -4
arch/x86/include/asm/smap.h
··· 40 40 unsigned long flags; 41 41 42 42 asm volatile ("# smap_save\n\t" 43 - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE 43 + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t" 44 44 "", "pushf; pop %0; clac", 45 45 X86_FEATURE_SMAP) 46 46 : "=rm" (flags) : : "memory", "cc"); ··· 51 51 static __always_inline void smap_restore(unsigned long flags) 52 52 { 53 53 asm volatile ("# smap_restore\n\t" 54 - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE 54 + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t" 55 55 "", "push %0; popf", 56 56 X86_FEATURE_SMAP) 57 57 : : "g" (flags) : "memory", "cc"); ··· 64 64 ALTERNATIVE("", "stac", X86_FEATURE_SMAP) 65 65 66 66 #define ASM_CLAC_UNSAFE \ 67 - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "clac", X86_FEATURE_SMAP) 67 + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "clac", X86_FEATURE_SMAP) 68 68 #define ASM_STAC_UNSAFE \ 69 - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "stac", X86_FEATURE_SMAP) 69 + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "stac", X86_FEATURE_SMAP) 70 70 71 71 #endif /* __ASSEMBLER__ */ 72 72
+1 -1
arch/x86/include/asm/static_call.h
··· 36 36 ".align 4 \n" \ 37 37 ".globl " STATIC_CALL_TRAMP_STR(name) " \n" \ 38 38 STATIC_CALL_TRAMP_STR(name) ": \n" \ 39 - ANNOTATE_NOENDBR \ 39 + ANNOTATE_NOENDBR " \n" \ 40 40 insns " \n" \ 41 41 ".byte 0x0f, 0xb9, 0xcc \n" \ 42 42 ".type " STATIC_CALL_TRAMP_STR(name) ", @function \n" \
+2 -2
arch/x86/kernel/alternative.c
··· 2229 2229 " .pushsection .init.text, \"ax\", @progbits\n" 2230 2230 " .type int3_selftest_asm, @function\n" 2231 2231 "int3_selftest_asm:\n" 2232 - ANNOTATE_NOENDBR 2232 + ANNOTATE_NOENDBR "\n" 2233 2233 /* 2234 2234 * INT3 padded with NOP to CALL_INSN_SIZE. The INT3 triggers an 2235 2235 * exception, then the int3_exception_nb notifier emulates a call to ··· 2247 2247 " .pushsection .init.text, \"ax\", @progbits\n" 2248 2248 " .type int3_selftest_callee, @function\n" 2249 2249 "int3_selftest_callee:\n" 2250 - ANNOTATE_NOENDBR 2250 + ANNOTATE_NOENDBR "\n" 2251 2251 " movl $0x1234, (%" _ASM_ARG1 ")\n" 2252 2252 ASM_RET 2253 2253 " .size int3_selftest_callee, . - int3_selftest_callee\n"
+1 -1
arch/x86/kernel/rethook.c
··· 25 25 ".type arch_rethook_trampoline, @function\n" 26 26 "arch_rethook_trampoline:\n" 27 27 #ifdef CONFIG_X86_64 28 - ANNOTATE_NOENDBR /* This is only jumped from ret instruction */ 28 + ANNOTATE_NOENDBR "\n" /* This is only jumped from ret instruction */ 29 29 /* Push a fake return address to tell the unwinder it's a rethook. */ 30 30 " pushq $arch_rethook_trampoline\n" 31 31 UNWIND_HINT_FUNC
+2 -2
arch/x86/kernel/static_call.c
··· 50 50 ".type __static_call_return, @function\n\t" 51 51 ASM_FUNC_ALIGN "\n\t" 52 52 "__static_call_return:\n\t" 53 - ANNOTATE_NOENDBR 54 - ANNOTATE_RETPOLINE_SAFE 53 + ANNOTATE_NOENDBR "\n\t" 54 + ANNOTATE_RETPOLINE_SAFE "\n\t" 55 55 "ret; int3\n\t" 56 56 ".size __static_call_return, . - __static_call_return \n\t"); 57 57
+1 -1
arch/x86/lib/error-inject.c
··· 13 13 ".globl just_return_func\n" 14 14 ASM_FUNC_ALIGN 15 15 "just_return_func:\n" 16 - ANNOTATE_NOENDBR 16 + ANNOTATE_NOENDBR "\n" 17 17 ASM_RET 18 18 ".size just_return_func, .-just_return_func\n" 19 19 );
+3 -3
include/linux/annotate.h
··· 15 15 #ifndef __ASSEMBLY__ 16 16 17 17 #define ASM_ANNOTATE_LABEL(label, type) \ 18 - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t" 18 + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) 19 19 20 20 #define ASM_ANNOTATE(type) \ 21 21 "911: " \ 22 - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t" 22 + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) 23 23 24 24 #define ASM_ANNOTATE_DATA(type) \ 25 25 "912: " \ 26 - __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t" 26 + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) 27 27 28 28 #else /* __ASSEMBLY__ */ 29 29
+1 -1
include/linux/objtool.h
··· 12 12 #define UNWIND_HINT(type, sp_reg, sp_offset, signal) \ 13 13 "987: \n\t" \ 14 14 ".pushsection .discard.unwind_hints\n\t" \ 15 - ANNOTATE_DATA_SPECIAL \ 15 + ANNOTATE_DATA_SPECIAL "\n\t" \ 16 16 /* struct unwind_hint */ \ 17 17 ".long 987b - .\n\t" \ 18 18 ".short " __stringify(sp_offset) "\n\t" \