objtool: Improve code generation for annotation macros
Subsystems (7)
Josh Poimboeuf
maintainerv2 cover objtool: Improve code generation for annotation macros
For tip/objtool/urgent (fixing a "regression" in code generation).
Changes since v1 (https://lore.kernel.org/[email protected]):
- rebase on Linus's tree (bug.h conflicts)
As much as possible, undo the code generation damage introduced by ANNOTATE_DATA_SPECIAL:
- Remove its usage in favor of SHF_MERGE + sh_entsize, where possible
- Print the annotation on a single line:
912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
- Remove the trailing newline/tab; let the invoking code decide on the appropriate separator for the given context
Josh Poimboeuf (4):
x86/alternative: Remove ANNOTATE_DATA_SPECIAL usage x86/asm: Remove ANNOTATE_DATA_SPECIAL usage
objtool: Consolidate annotation macros
objtool: Remove newlines and tabs from annotation macros
arch/um/include/asm/Kbuild | 1 - arch/um/include/shared/common-offsets.h | 3 ++ arch/x86/include/asm/alternative.h | 9 +++--- arch/x86/include/asm/asm.h | 25 ++++++++------- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/jump_label.h | 2 +- arch/x86/include/asm/nospec-branch.h | 4 +-- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/include/asm/smap.h | 8 ++--- arch/x86/include/asm/static_call.h | 2 +- arch/x86/kernel/alternative.c | 4 +-- arch/x86/kernel/asm-offsets.c | 3 ++ arch/x86/kernel/rethook.c | 2 +- arch/x86/kernel/static_call.c | 4 +-- arch/x86/lib/error-inject.c | 2 +- arch/x86/um/shared/sysdep/kernel-offsets.h | 2 ++ include/linux/annotate.h | 36 +++++++++------------- include/linux/objtool.h | 2 +- kernel/bounds.c | 1 + scripts/mod/devicetable-offsets.c | 1 + 22 files changed, 62 insertions(+), 57 deletions(-)
Signature · 1 line
2.51.1
Josh Poimboeuf
maintainerPATCH v2 1/4 x86/alternative: Remove ANNOTATE_DATA_SPECIAL usage
Instead of manually annotating each .altinstructions entry, just make the section mergeable and store the entry size in the ELF section header.
Either way works for objtool create_fake_symbols(), this way produces cleaner code generation.
--- arch/um/include/shared/common-offsets.h | 2 ++ arch/x86/include/asm/alternative.h | 7 +++---- arch/x86/kernel/asm-offsets.c | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-)
arch/um/include/shared/common-offsets.h +2 -0
@@ -18,3 +18,5 @@ DEFINE(UM_NSEC_PER_USEC, NSEC_PER_USEC);DEFINE (UM_KERN_GDT_ENTRY_TLS_ENTRIES ,GDT_ENTRY_TLS_ENTRIES );DEFINE (UM_SECCOMP_ARCH_NATIVE ,SECCOMP_ARCH_NATIVE ); + +DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr ));
arch/x86/include/asm/alternative.h +3 -4
@@ -197,8 +197,8 @@ static inline int alternatives_text_reserved(void *start, void *end) "773:\n"#define ALTINSTR_ENTRY (ft_flags) \ - ".pushsection .altinstructions,\"a\"\n" \ - ANNOTATE_DATA_SPECIAL \ + ".pushsection .altinstructions, \"aM\", @progbits, " \ + __stringify(ALT_INSTR_SIZE) "\n" \ " .long 771b - .\n"/* label */ \" .long 774f - .\n" /* new instruction */ \ " .4byte " __stringify(ft_flags) "\n" /* feature + flags */ \
@@ -339,7 +339,6 @@ void nop_func(void);* instruction. See apply_alternatives(). */ .macro altinstr_entry orig alt ft_flags orig_len alt_len - ANNOTATE_DATA_SPECIAL .long \orig - . .long \alt - . .4byte \ft_flags
@@ -363,7 +362,7 @@ void nop_func(void); 741: \ .skip -(((744f-743f)-(741b-740b)) > 0) * ((744f-743f)-(741b-740b)),0x90 ;\ 742: \ - .pushsection .altinstructions,"a" ; \ + .pushsection .altinstructions, "aM", @progbits, ALT_INSTR_SIZE ;\altinstr_entry 740b,743f,flag,742b-740b,744f-743f ; \ .popsection ; \ .pushsection .altinstr_replacement," ax" ; \
arch/x86/kernel/asm-offsets.c +2 -0
@@ -124,4 +124,6 @@ static void __used common(void)OFFSET (ARIA_CTX_rounds, aria_ctx, rounds);#endif +BLANK (); +DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr )); }
Signature · 1 line
2.51.1
[tip: objtool/urgent] x86/alternative: Remove ANNOTATE_DATA_SPECIAL usage
The following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: a818f28f017b23cfe830dd82e89b5aa6b0fea8e5 Gitweb: https://git.kernel.org/tip/a818f28f017b23cfe830dd82e89b5aa6b0fea8e5 Author: Josh Poimboeuf <[email protected]> AuthorDate: Tue, 02 Dec 2025 09:59:36 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 16:53:19 +01:00
x86/alternative: Remove ANNOTATE_DATA_SPECIAL usage
Instead of manually annotating each .altinstructions entry, just make the section mergeable and store the entry size in the ELF section header.
Either way works for objtool create_fake_symbols(), this way produces cleaner code generation.
--- arch/um/include/shared/common-offsets.h | 2 ++ arch/x86/include/asm/alternative.h | 7 +++---- arch/x86/kernel/asm-offsets.c | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-)
arch/um/include/shared/common-offsets.h +2 -0
@@ -18,3 +18,5 @@ DEFINE(UM_NSEC_PER_USEC, NSEC_PER_USEC);DEFINE (UM_KERN_GDT_ENTRY_TLS_ENTRIES ,GDT_ENTRY_TLS_ENTRIES );DEFINE (UM_SECCOMP_ARCH_NATIVE ,SECCOMP_ARCH_NATIVE ); + +DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr ));
arch/x86/include/asm/alternative.h +3 -4
@@ -197,8 +197,8 @@ static inline int alternatives_text_reserved(void *start, void *end) "773:\n"#define ALTINSTR_ENTRY (ft_flags) \ - ".pushsection .altinstructions,\"a\"\n" \ - ANNOTATE_DATA_SPECIAL \ + ".pushsection .altinstructions, \"aM\", @progbits, " \ + __stringify(ALT_INSTR_SIZE) "\n" \ " .long 771b - .\n"/* label */ \" .long 774f - .\n" /* new instruction */ \ " .4byte " __stringify(ft_flags) "\n" /* feature + flags */ \
@@ -339,7 +339,6 @@ void nop_func(void);* instruction. See apply_alternatives(). */ .macro altinstr_entry orig alt ft_flags orig_len alt_len - ANNOTATE_DATA_SPECIAL .long \orig - . .long \alt - . .4byte \ft_flags
@@ -363,7 +362,7 @@ void nop_func(void); 741: \ .skip -(((744f-743f)-(741b-740b)) > 0) * ((744f-743f)-(741b-740b)),0x90 ;\ 742: \ - .pushsection .altinstructions,"a" ; \ + .pushsection .altinstructions, "aM", @progbits, ALT_INSTR_SIZE ;\altinstr_entry 740b,743f,flag,742b-740b,744f-743f ; \ .popsection ; \ .pushsection .altinstr_replacement," ax" ; \
arch/x86/kernel/asm-offsets.c +2 -0
@@ -124,4 +124,6 @@ static void __used common(void)OFFSET (ARIA_CTX_rounds, aria_ctx, rounds);#endif +BLANK (); +DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr )); }
Josh Poimboeuf
maintainerPATCH v2 2/4 x86/asm: Remove ANNOTATE_DATA_SPECIAL usage
In reply to Josh PoimboeufInstead of manually annotating each __ex_table entry, just make the section mergeable and store the entry size in the ELF section header.
Either way works for objtool create_fake_symbols(), this way produces cleaner code generation.
--- arch/um/include/asm/Kbuild | 1 - arch/um/include/shared/common-offsets.h | 1 + arch/x86/include/asm/asm.h | 25 ++++++++++++---------- arch/x86/kernel/asm-offsets.c | 1 + arch/x86/um/shared/sysdep/kernel-offsets.h | 2 ++ kernel/bounds.c | 1 + scripts/mod/devicetable-offsets.c | 1 + 7 files changed, 20 insertions(+), 12 deletions(-)
arch/um/include/asm/Kbuild +0 -1
@@ -5,7 +5,6 @@ generic-y += device.h generic-y += dma-mapping.h generic-y += emergency-restart.h generic-y += exec.h -generic-y += extable.h generic-y += ftrace.h generic-y += hw_irq.h generic-y += irq_regs.h
arch/um/include/shared/common-offsets.h +1 -0
@@ -20,3 +20,4 @@ DEFINE(UM_KERN_GDT_ENTRY_TLS_ENTRIES, GDT_ENTRY_TLS_ENTRIES);DEFINE (UM_SECCOMP_ARCH_NATIVE ,SECCOMP_ARCH_NATIVE );DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr )); +DEFINE (EXTABLE_SIZE ,sizeof (struct exception_table_entry ));
arch/x86/include/asm/asm.h +14 -11
@@ -126,18 +126,21 @@ static __always_inline __pure void *rip_rel_ptr(void *p)#ifdef __KERNEL__ +#ifndef COMPILE_OFFSETS +#include <asm/asm-offsets.h> +#endif +# include <asm/extable_fixup_types.h> /* Exception table entry */ #ifdef __ASSEMBLER__ -# define _ASM_EXTABLE_TYPE (from, to, type) \ - .pushsection "__ex_table","a" ; \ - .balign 4 ; \ - ANNOTATE_DATA_SPECIAL ; \ - .long (from) - . ; \ - .long (to) - . ; \ - .long type ; \ +# define _ASM_EXTABLE_TYPE (from, to, type) \ + .pushsection "__ex_table", "aM", @progbits, EXTABLE_SIZE ; \ + .balign 4 ; \ + .long (from) - . ; \ + .long (to) - . ; \ + .long type ; \ .popsection# ifdef CONFIG_KPROBES
@@ -180,18 +183,18 @@ static __always_inline __pure void *rip_rel_ptr(void *p) ".purgem extable_type_reg\n"# define _ASM_EXTABLE_TYPE (from, to, type) \ - " .pushsection \"__ex_table\",\"a\"\n" \ + " .pushsection __ex_table, \"aM\", @progbits, " \ + __stringify(EXTABLE_SIZE) "\n" \ " .balign 4\n" \ - ANNOTATE_DATA_SPECIAL \ " .long (" #from ") - .\n" \ " .long (" #to ") - .\n" \ " .long " __stringify(type) " \n" \ " .popsection\n"# define _ASM_EXTABLE_TYPE_REG (from, to, type, reg) \ - " .pushsection \"__ex_table\",\"a\"\n" \ + " .pushsection __ex_table, \"aM\", @progbits, " \ + __stringify(EXTABLE_SIZE) "\n" \ " .balign 4\n" \ - ANNOTATE_DATA_SPECIAL \ " .long (" #from ") - .\n" \ " .long (" #to ") - .\n" \ DEFINE_EXTABLE_TYPE_REG \
arch/x86/kernel/asm-offsets.c +1 -0
@@ -126,4 +126,5 @@ static void __used common(void)BLANK ();DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr )); +DEFINE (EXTABLE_SIZE ,sizeof (struct exception_table_entry )); }
arch/x86/um/shared/sysdep/kernel-offsets.h +2 -0
@@ -1,4 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ +#define COMPILE_OFFSETS #include <linux/stddef.h> #include <linux/sched.h> #include <linux/elf.h>
@@ -7,6 +8,7 @@#include <linux/audit.h> #include <asm/mman.h> #include <asm/seccomp.h> +#include <asm/extable.h> /* workaround for a warning with -Wmissing-prototypes */ void foo (void );
kernel/bounds.c +1 -0
@@ -6,6 +6,7 @@*/ #define __GENERATING_BOUNDS_H +#define COMPILE_OFFSETS /* Include headers that define the enum constants of interest */ #include <linux/page-flags.h> #include <linux/mmzone.h>
scripts/mod/devicetable-offsets.c +1 -0
@@ -1,4 +1,5 @@// SPDX-License-Identifier: GPL-2.0 +#define COMPILE_OFFSETS #include <linux/kbuild.h> #include <linux/mod_devicetable.h>
Signature · 1 line
2.51.1
[tip: objtool/urgent] x86/asm: Remove ANNOTATE_DATA_SPECIAL usage
The following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: f387d0e1027f2d13cbfc1305b54198af701ede19 Gitweb: https://git.kernel.org/tip/f387d0e1027f2d13cbfc1305b54198af701ede19 Author: Josh Poimboeuf <[email protected]> AuthorDate: Tue, 02 Dec 2025 09:59:37 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 16:53:19 +01:00
x86/asm: Remove ANNOTATE_DATA_SPECIAL usage
Instead of manually annotating each __ex_table entry, just make the section mergeable and store the entry size in the ELF section header.
Either way works for objtool create_fake_symbols(), this way produces cleaner code generation.
--- arch/um/include/asm/Kbuild | 1 +- arch/um/include/shared/common-offsets.h | 1 +- arch/x86/include/asm/asm.h | 25 +++++++++++---------- arch/x86/kernel/asm-offsets.c | 1 +- arch/x86/um/shared/sysdep/kernel-offsets.h | 2 ++- kernel/bounds.c | 1 +- scripts/mod/devicetable-offsets.c | 1 +- 7 files changed, 20 insertions(+), 12 deletions(-)
arch/um/include/asm/Kbuild +0 -1
@@ -5,7 +5,6 @@ generic-y += device.h generic-y += dma-mapping.h generic-y += emergency-restart.h generic-y += exec.h -generic-y += extable.h generic-y += ftrace.h generic-y += hw_irq.h generic-y += irq_regs.h
arch/um/include/shared/common-offsets.h +1 -0
@@ -20,3 +20,4 @@ DEFINE(UM_KERN_GDT_ENTRY_TLS_ENTRIES, GDT_ENTRY_TLS_ENTRIES);DEFINE (UM_SECCOMP_ARCH_NATIVE ,SECCOMP_ARCH_NATIVE );DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr )); +DEFINE (EXTABLE_SIZE ,sizeof (struct exception_table_entry ));
arch/x86/include/asm/asm.h +14 -11
@@ -126,18 +126,21 @@ static __always_inline __pure void *rip_rel_ptr(void *p)#ifdef __KERNEL__ +#ifndef COMPILE_OFFSETS +#include <asm/asm-offsets.h> +#endif +# include <asm/extable_fixup_types.h> /* Exception table entry */ #ifdef __ASSEMBLER__ -# define _ASM_EXTABLE_TYPE (from, to, type) \ - .pushsection "__ex_table","a" ; \ - .balign 4 ; \ - ANNOTATE_DATA_SPECIAL ; \ - .long (from) - . ; \ - .long (to) - . ; \ - .long type ; \ +# define _ASM_EXTABLE_TYPE (from, to, type) \ + .pushsection "__ex_table", "aM", @progbits, EXTABLE_SIZE ; \ + .balign 4 ; \ + .long (from) - . ; \ + .long (to) - . ; \ + .long type ; \ .popsection# ifdef CONFIG_KPROBES
@@ -180,18 +183,18 @@ static __always_inline __pure void *rip_rel_ptr(void *p) ".purgem extable_type_reg\n"# define _ASM_EXTABLE_TYPE (from, to, type) \ - " .pushsection \"__ex_table\",\"a\"\n" \ + " .pushsection __ex_table, \"aM\", @progbits, " \ + __stringify(EXTABLE_SIZE) "\n" \ " .balign 4\n" \ - ANNOTATE_DATA_SPECIAL \ " .long (" #from ") - .\n" \ " .long (" #to ") - .\n" \ " .long " __stringify(type) " \n" \ " .popsection\n"# define _ASM_EXTABLE_TYPE_REG (from, to, type, reg) \ - " .pushsection \"__ex_table\",\"a\"\n" \ + " .pushsection __ex_table, \"aM\", @progbits, " \ + __stringify(EXTABLE_SIZE) "\n" \ " .balign 4\n" \ - ANNOTATE_DATA_SPECIAL \ " .long (" #from ") - .\n" \ " .long (" #to ") - .\n" \ DEFINE_EXTABLE_TYPE_REG \
arch/x86/kernel/asm-offsets.c +1 -0
@@ -126,4 +126,5 @@ static void __used common(void)BLANK ();DEFINE (ALT_INSTR_SIZE ,sizeof (struct alt_instr )); +DEFINE (EXTABLE_SIZE ,sizeof (struct exception_table_entry )); }
arch/x86/um/shared/sysdep/kernel-offsets.h +2 -0
@@ -1,4 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ +#define COMPILE_OFFSETS #include <linux/stddef.h> #include <linux/sched.h> #include <linux/elf.h>
@@ -7,6 +8,7 @@#include <linux/audit.h> #include <asm/mman.h> #include <asm/seccomp.h> +#include <asm/extable.h> /* workaround for a warning with -Wmissing-prototypes */ void foo (void );
kernel/bounds.c +1 -0
@@ -6,6 +6,7 @@*/ #define __GENERATING_BOUNDS_H +#define COMPILE_OFFSETS /* Include headers that define the enum constants of interest */ #include <linux/page-flags.h> #include <linux/mmzone.h>
scripts/mod/devicetable-offsets.c +1 -0
@@ -1,4 +1,5 @@// SPDX-License-Identifier: GPL-2.0 +#define COMPILE_OFFSETS #include <linux/kbuild.h> #include <linux/mod_devicetable.h>
Josh Poimboeuf
maintainerPATCH v2 3/4 objtool: Consolidate annotation macros
In reply to Josh PoimboeufConsolidate __ASM_ANNOTATE into a single macro which is used by both C and asm. This also makes the code generation a bit more palatable by putting it all on a single line.
--- include/linux/annotate.h | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-)
include/linux/annotate.h +15 -21
@@ -6,41 +6,35 @@#ifdef CONFIG_OBJTOOL +#define __ASM_ANNOTATE (section, label, type) \ + .pushsection section, "M", @progbits, 8; \ + .long label - .; \ + .long type; \ + .popsection +#ifndef __ASSEMBLY__ -#define __ASM_ANNOTATE (section, label, type) \ - ".pushsection " section ",\"M\", @progbits, 8\n\t" \ - ".long " __stringify(label) " - .\n\t" \ - ".long " __stringify(type) "\n\t" \ - ".popsection\n\t" -#define ASM_ANNOTATE_LABEL (label, type) \ - __ASM_ANNOTATE(".discard.annotate_insn", label, type) + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t"#define ASM_ANNOTATE (type) \ - "911:\n\t" \ - ASM_ANNOTATE_LABEL(911b, type) + "911: " \ + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t"#define ASM_ANNOTATE_DATA (type) \ - "912:\n\t" \ - __ASM_ANNOTATE(".discard.annotate_data", 912b, type) + "912: " \ + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t"#else /* __ASSEMBLY__ */ -.macro __ANNOTATE section, type -.Lhere_\@: - .pushsection \section, "M", @progbits, 8 - .long .Lhere_\@ - . - .long \type - .popsection -.endm - .macro ANNOTATE type - __ANNOTATE ".discard.annotate_insn", \type +.Lhere_\@: + __ASM_ANNOTATE(".discard.annotate_insn", .Lhere_\@, \type) .endm .macro ANNOTATE_DATA type - __ANNOTATE ".discard.annotate_data", \type +.Lhere_\@: + __ASM_ANNOTATE(".discard.annotate_data", .Lhere_\@, \type) .endm#endif /* __ASSEMBLY__ */
Signature · 1 line
2.51.1
[tip: objtool/urgent] objtool: Consolidate annotation macros
The following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 50765fb2746db2ac1d0b4dc9033b077734807689 Gitweb: https://git.kernel.org/tip/50765fb2746db2ac1d0b4dc9033b077734807689 Author: Josh Poimboeuf <[email protected]> AuthorDate: Tue, 02 Dec 2025 09:59:38 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 16:53:19 +01:00
objtool: Consolidate annotation macros
Consolidate __ASM_ANNOTATE into a single macro which is used by both C and asm. This also makes the code generation a bit more palatable by putting it all on a single line.
--- include/linux/annotate.h | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-)
include/linux/annotate.h +15 -21
@@ -6,41 +6,35 @@#ifdef CONFIG_OBJTOOL -#ifndef __ASSEMBLY__ -#define __ASM_ANNOTATE (section, label, type) \ - ".pushsection " section ",\"M\", @progbits, 8\n\t" \ - ".long " __stringify(label) " - .\n\t" \ - ".long " __stringify(type) "\n\t" \ - ".popsection\n\t" + .pushsection section, "M", @progbits, 8; \ + .long label - .; \ + .long type; \ + .popsection + +#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __ASM_ANNOTATE(".discard.annotate_insn", label, type) + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t"#define ASM_ANNOTATE (type) \ - "911:\n\t" \ - ASM_ANNOTATE_LABEL(911b, type) + "911: " \ + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t"#define ASM_ANNOTATE_DATA (type) \ - "912:\n\t" \ - __ASM_ANNOTATE(".discard.annotate_data", 912b, type) + "912: " \ + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t"#else /* __ASSEMBLY__ */ -.macro __ANNOTATE section, type -.Lhere_\@: - .pushsection \section, "M", @progbits, 8 - .long .Lhere_\@ - . - .long \type - .popsection -.endm - .macro ANNOTATE type - __ANNOTATE ".discard.annotate_insn", \type +.Lhere_\@: + __ASM_ANNOTATE(".discard.annotate_insn", .Lhere_\@, \type) .endm .macro ANNOTATE_DATA type - __ANNOTATE ".discard.annotate_data", \type +.Lhere_\@: + __ASM_ANNOTATE(".discard.annotate_data", .Lhere_\@, \type) .endm#endif /* __ASSEMBLY__ */
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 4 lines · On Wed, 3 Dec 2025 at 08:40, tip-bot2 for Josh Poimboeuf…
Consolidate
__ASM_ANNOTATEinto a single macro which is used by both C and asm. This also makes the code generation a bit more palatable by putting it all on a single line.
No objections, but I just wanted to say that when stating "this makes the code generation more palatable", it would be good to actually show *how* it does it (with just an example).
Because it's hard to read that diff and figure out what the actual effect is. I can just about see it, but...
Linus
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · On Wed, 3 Dec 2025 at 08:40, tip-bot2 for Josh Poimboeuf…
Consolidate
__ASM_ANNOTATEinto a single macro which is used by both C and asm. This also makes the code generation a bit more palatable by putting it all on a single line.
Quoted 6 lines
No objections, but I just wanted to say that when stating "this makes the code generation more palatable", it would be good to actually show *how* it does it (with just an example).
Because it's hard to read that diff and figure out what the actual effect is. I can just about see it, but...
Sorry, should have added this to the changelog.
Find below a diff of the arch/x86/kernel/process.s output of your tree versus current tip:objtool/urgent.
Thanks,
Ingo
process.s.fixed renamed from process.s.linus +2 -6
@@ -13,12 +13,8 @@ .align 4 .globl __SCT__x86_idle __SCT__x86_idle: -911: - .pushsection .discard.annotate_insn,"M", @progbits, 8 - .long 911b - . - .long 1 - .popsection - jmp __x86_return_thunk +911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 1; .popsection +jmp __x86_return_thunk .byte 0x0f, 0xb9, 0xcc .type __SCT__x86_idle, @function .size __SCT__x86_idle, . - __SCT__x86_idle
@@ -58,35 +54,22 @@ default_idle:
# 107 "/home/mingo/tip/arch/x86/include/asm/paravirt.h" 1
# ALT: oldinstr
771:
- 911:
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 911b - .
- .long 2
- .popsection
+ 911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 2; .popsection
call *pv_ops+8(%rip); # pv_ops.irq.safe_halt
772:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte (((1 << 1) << 16) | (( 3*32+21)))
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
call BUG_func
775:
...
@@ -139,12 +122,8 @@ mwait_idle:
1:jmp .L5 #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L5 - . #
.quad cpu_buf_idle_clear + 1 - . #,
.popsection
@@ -183,25 +162,16 @@ mwait_idle:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte (22*32 + (7))
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
clflush (%rax) # pretmp_19
775:
@@ -589,14 +559,9 @@ set_cpuid_faulting:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -607,12 +572,8 @@ set_cpuid_faulting:
1: jmp .L32 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L32 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -807,12 +768,8 @@ arch_release_task_struct:
1: jmp .L60 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L60 - . #
.quad __fpu_state_size_dynamic + 0 + 2 - . #,
.popsection
@@ -1027,25 +984,16 @@ copy_thread:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L78 #
775:
@@ -1055,37 +1003,24 @@ copy_thread:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 516 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $16, boot_cpu_data+112(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $16, boot_cpu_data+112(%rip) #,
jnz .L77 #
jmp .L78 #
.popsection
@@ -1283,25 +1218,16 @@ flush_thread:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L103 #
775:
@@ -1311,37 +1237,24 @@ flush_thread:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 516 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $16, boot_cpu_data+112(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $16, boot_cpu_data+112(%rip) #,
jnz .L104 #
jmp .L103 #
.popsection
@@ -1820,20 +1733,12 @@ native_tss_update_io_bitmap:
#APP
# 486 "/home/mingo/tip/arch/x86/kernel/process.c" 1
855: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 855b - .
- .long 3
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 855b - .; .long 3; .popsection
# 0 "" 2
# 486 "/home/mingo/tip/arch/x86/kernel/process.c" 1
1: .byte 0x0f, 0x0b ;
.pushsection __bug_table,"aw"
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
2:
.long 1b - . # bug_entry::bug_addr
.long .LC4 - . # bug_entry::format #
@@ -1842,19 +1747,11 @@ native_tss_update_io_bitmap:
.word 2307 # bug_entry::flags #
.org 2b + 16 #
.popsection
-.pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 1b - .
- .long 8
- .popsection
-
+.pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 1b - .; .long 8; .popsection
# 0 "" 2
# 486 "/home/mingo/tip/arch/x86/kernel/process.c" 1
856: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 856b - .
- .long 4
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 856b - .; .long 4; .popsection
# 0 "" 2
# /home/mingo/tip/arch/x86/include/asm/bitops.h:75: asm_inline volatile(LOCK_PREFIX "andb %b1,%0"
# 75 "/home/mingo/tip/arch/x86/include/asm/bitops.h" 1
@@ -1886,11 +1783,7 @@ native_tss_update_io_bitmap:
#APP
# 328 "/home/mingo/tip/arch/x86/include/asm/desc.h" 1
463: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 463b - .
- .long 3
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 463b - .; .long 3; .popsection
# 0 "" 2
#NO_APP
call debug_locks_off #
@@ -1906,11 +1799,7 @@ native_tss_update_io_bitmap:
#APP
# 328 "/home/mingo/tip/arch/x86/include/asm/desc.h" 1
465: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 465b - .
- .long 4
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 465b - .; .long 4; .popsection
# 0 "" 2
#NO_APP
jmp .L149 #
@@ -1936,11 +1825,7 @@ native_tss_update_io_bitmap:
lea (2f)(%rip), %rdi # bug
1:
.pushsection __bug_table,"aw"
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
2:
.long 1b - . # bug_entry::bug_addr
.long .LC6 - . # bug_entry::format #
@@ -2003,11 +1888,7 @@ ret_from_fork:
#APP
# 193 "/home/mingo/tip/include/linux/entry-common.h" 1
768: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 768b - .
- .long 3
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 768b - .; .long 3; .popsection
# 0 "" 2
# /home/mingo/tip/arch/x86/include/asm/current.h:23: return this_cpu_read_const(const_current_task);
#NO_APP
@@ -2020,12 +1901,8 @@ ret_from_fork:
1: jmp .L174 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L174 - . #
.quad rseq_debug_enabled + 0 + 2 - . #,
.popsection
@@ -2062,12 +1939,8 @@ ret_from_fork:
1: jmp .L182 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L182 - . #
.quad randomize_kstack_offset + 0 + 2 - . #,
.popsection
@@ -2087,25 +1960,16 @@ ret_from_fork:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L185 #
775:
@@ -2115,37 +1979,24 @@ ret_from_fork:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 686 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $64, boot_cpu_data+133(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $64, boot_cpu_data+133(%rip) #,
jnz .L184 #
jmp .L185 #
.popsection
@@ -2163,20 +2014,12 @@ ret_from_fork:
#APP
# 195 "/home/mingo/tip/include/linux/entry-common.h" 1
769: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 769b - .
- .long 4
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 769b - .; .long 4; .popsection
# 0 "" 2
# /home/mingo/tip/include/linux/irq-entry-common.h:295: instrumentation_begin();
# 295 "/home/mingo/tip/include/linux/irq-entry-common.h" 1
759: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 759b - .
- .long 3
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 759b - .; .long 3; .popsection
# 0 "" 2
# /home/mingo/tip/arch/x86/include/asm/atomic64_64.h:15: return __READ_ONCE((v)->counter);
#NO_APP
@@ -2189,11 +2032,7 @@ ret_from_fork:
#APP
# 299 "/home/mingo/tip/include/linux/irq-entry-common.h" 1
760: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 760b - .
- .long 4
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 760b - .; .long 4; .popsection
# 0 "" 2
# /home/mingo/tip/arch/x86/include/asm/processor.h:709: asm volatile(ALTERNATIVE("", "div %2\n\t", X86_BUG_DIV0)
#NO_APP
@@ -2209,25 +2048,16 @@ ret_from_fork:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte (22*32 + (1*32+ 1))
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
div %ecx # tmp152
@@ -2280,25 +2110,16 @@ ret_from_fork:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 7*32+26)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
call write_ibpb
775:
@@ -2534,25 +2355,16 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L234 #
775:
@@ -2562,37 +2374,24 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 441 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $2, boot_cpu_data+103(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $2, boot_cpu_data+103(%rip) #,
jnz .L235 #
jmp .L234 #
.popsection
@@ -2613,14 +2412,9 @@ speculation_ctrl_update:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -2631,12 +2425,8 @@ speculation_ctrl_update:
1: jmp .L239 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L239 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -2653,12 +2443,8 @@ speculation_ctrl_update:
1: jmp .L257 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L257 - . #
.quad switch_to_cond_stibp + 0 + 2 - . #,
.popsection
@@ -2708,25 +2494,16 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L237 #
775:
@@ -2736,37 +2513,24 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 248 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $1, boot_cpu_data+79(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $1, boot_cpu_data+79(%rip) #,
jnz .L238 #
jmp .L237 #
.popsection
@@ -2792,25 +2556,16 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L245 #
775:
@@ -2820,37 +2575,24 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 252 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $16, boot_cpu_data+79(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $16, boot_cpu_data+79(%rip) #,
jnz .L244 #
jmp .L245 #
.popsection
@@ -2919,25 +2661,16 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L242 #
775:
@@ -2947,37 +2680,24 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 607 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $128, boot_cpu_data+123(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $128, boot_cpu_data+123(%rip) #,
jnz .L243 #
jmp .L242 #
.popsection
@@ -3022,14 +2742,9 @@ speculation_ctrl_update:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -3040,12 +2755,8 @@ speculation_ctrl_update:
1: jmp .L250 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L250 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -3066,25 +2777,16 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L240 #
775:
@@ -3094,37 +2796,24 @@ speculation_ctrl_update:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 440 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $1, boot_cpu_data+103(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $1, boot_cpu_data+103(%rip) #,
jnz .L243 #
jmp .L240 #
.popsection
@@ -3197,14 +2886,9 @@ speculation_ctrl_update:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -3215,12 +2899,8 @@ speculation_ctrl_update:
1: jmp .L254 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L254 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -3243,14 +2923,9 @@ speculation_ctrl_update:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -3261,12 +2936,8 @@ speculation_ctrl_update:
1: jmp .L252 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L252 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -3551,14 +3222,9 @@ __switch_to_xtra:
# 70 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: rdmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 9
.popsection
@@ -3574,12 +3240,8 @@ __switch_to_xtra:
1: jmp .L310 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L310 - . #
.quad __tracepoint_read_msr+8 + 0 + 2 - . #,
.popsection
@@ -3606,14 +3268,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -3624,12 +3281,8 @@ __switch_to_xtra:
1: jmp .L312 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L312 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -3665,25 +3318,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L318 #
775:
@@ -3693,37 +3337,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 441 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $2, boot_cpu_data+103(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $2, boot_cpu_data+103(%rip) #,
jnz .L317 #
jmp .L318 #
.popsection
@@ -3744,12 +3375,8 @@ __switch_to_xtra:
1: jmp .L342 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L342 - . #
.quad switch_to_cond_stibp + 0 + 2 - . #,
.popsection
@@ -3785,25 +3412,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L324 #
775:
@@ -3813,37 +3431,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 248 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $1, boot_cpu_data+79(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $1, boot_cpu_data+79(%rip) #,
jnz .L325 #
jmp .L324 #
.popsection
@@ -3872,25 +3477,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L331 #
775:
@@ -3900,37 +3496,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 252 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $16, boot_cpu_data+79(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $16, boot_cpu_data+79(%rip) #,
jnz .L330 #
jmp .L331 #
.popsection
@@ -4028,25 +3611,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L347 #
775:
@@ -4056,37 +3630,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 441 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $2, boot_cpu_data+103(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $2, boot_cpu_data+103(%rip) #,
jnz .L348 #
jmp .L347 #
.popsection
@@ -4107,14 +3668,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -4125,12 +3681,8 @@ __switch_to_xtra:
1: jmp .L352 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L352 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -4147,12 +3699,8 @@ __switch_to_xtra:
1: jmp .L370 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L370 - . #
.quad switch_to_cond_stibp + 0 + 2 - . #,
.popsection
@@ -4213,25 +3761,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L328 #
775:
@@ -4241,37 +3780,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 607 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $128, boot_cpu_data+123(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $128, boot_cpu_data+123(%rip) #,
jnz .L329 #
jmp .L328 #
.popsection
@@ -4308,14 +3834,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -4326,12 +3847,8 @@ __switch_to_xtra:
1: jmp .L326 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L326 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -4352,25 +3869,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L321 #
775:
@@ -4380,37 +3888,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 440 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $1, boot_cpu_data+103(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $1, boot_cpu_data+103(%rip) #,
jnz .L329 #
jmp .L321 #
.popsection
@@ -4445,14 +3940,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -4463,12 +3953,8 @@ __switch_to_xtra:
1: jmp .L336 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L336 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -4496,25 +3982,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L350 #
775:
@@ -4524,37 +4001,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 248 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $1, boot_cpu_data+79(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $1, boot_cpu_data+79(%rip) #,
jnz .L351 #
jmp .L350 #
.popsection
@@ -4580,25 +4044,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L358 #
775:
@@ -4608,37 +4063,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 252 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $16, boot_cpu_data+79(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $16, boot_cpu_data+79(%rip) #,
jnz .L357 #
jmp .L358 #
.popsection
@@ -4728,25 +4170,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L355 #
775:
@@ -4756,37 +4189,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 607 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $128, boot_cpu_data+123(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $128, boot_cpu_data+123(%rip) #,
jnz .L356 #
jmp .L355 #
.popsection
@@ -4823,25 +4243,16 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte ( 3*32+21)
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
jmp .L353 #
775:
@@ -4851,37 +4262,24 @@ __switch_to_xtra:
# ALT: padding
.skip -(((775f-774f)-(772b-771b)) > 0) * ((775f-774f)-(772b-771b)),0x90
773:
-.pushsection .altinstructions,"a"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 771b - .
+.pushsection .altinstructions, "aM", @progbits, 14
+ .long 771b - .
.long 774f - .
.4byte 440 #
.byte 773b-771b
.byte 775f-774f
.popsection
.pushsection .altinstr_replacement, "ax"
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- # ALT: replacement
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection +# ALT: replacement
774:
775:
.popsection
.pushsection .altinstr_aux,"ax"
6:
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- testb $1, boot_cpu_data+103(%rip) #,
+912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+ testb $1, boot_cpu_data+103(%rip) #,
jnz .L356 #
jmp .L353 #
.popsection
@@ -4909,14 +4307,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -4927,12 +4320,8 @@ __switch_to_xtra:
1: jmp .L363 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L363 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -4990,14 +4379,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -5008,12 +4392,8 @@ __switch_to_xtra:
1: jmp .L338 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L338 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -5039,14 +4419,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -5057,12 +4432,8 @@ __switch_to_xtra:
1: jmp .L340 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L340 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -5099,14 +4470,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -5117,12 +4483,8 @@ __switch_to_xtra:
1: jmp .L367 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L367 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -5151,14 +4513,9 @@ __switch_to_xtra:
# 80 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: wrmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 8
.popsection
@@ -5169,12 +4526,8 @@ __switch_to_xtra:
1: jmp .L365 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L365 - . #
.quad __tracepoint_write_msr+8 + 0 + 2 - . #,
.popsection
@@ -5269,20 +4622,12 @@ arch_cpu_idle_dead:
#APP
# 85 "/home/mingo/tip/arch/x86/include/asm/smp.h" 1
56: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 56b - .
- .long 3
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 56b - .; .long 3; .popsection
# 0 "" 2
# 85 "/home/mingo/tip/arch/x86/include/asm/smp.h" 1
1: .byte 0x0f, 0x0b ;
.pushsection __bug_table,"aw"
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
2:
.long 1b - . # bug_entry::bug_addr
.long .LC4 - . # bug_entry::format #
@@ -5378,12 +4723,8 @@ stop_this_cpu:
1:jmp .L422 #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L422 - . #
.quad cpu_buf_idle_clear + 1 - . #,
.popsection
@@ -5410,20 +4751,12 @@ stop_this_cpu:
#APP
# 854 "/home/mingo/tip/arch/x86/kernel/process.c" 1
862: nop
- .pushsection .discard.annotate_insn,"M", @progbits, 8
- .long 862b - .
- .long 3
- .popsection
-
+ .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 862b - .; .long 3; .popsection
# 0 "" 2
# 854 "/home/mingo/tip/arch/x86/kernel/process.c" 1
1: .byte 0x0f, 0x0b ;
.pushsection __bug_table,"aw"
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
2:
.long 1b - . # bug_entry::bug_addr
.long .LC4 - . # bug_entry::format #
@@ -5669,14 +5002,9 @@ arch_post_acpi_subsys_init:
# 70 "/home/mingo/tip/arch/x86/include/asm/msr.h" 1
1: rdmsr
2:
- .pushsection "__ex_table","a"
+ .pushsection __ex_table, "aM", @progbits, 12
.balign 4
-912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long (1b) - .
+ .long (1b) - .
.long (2b) - .
.long 9
.popsection
@@ -5693,12 +5021,8 @@ arch_post_acpi_subsys_init:
1: jmp .L457 # objtool NOPs this #
.pushsection __jump_table, "aw"
.balign 8
- 912:
- .pushsection .discard.annotate_data,"M", @progbits, 8
- .long 912b - .
- .long 1
- .popsection
- .long 1b - .
+ 912: .pushsection ".discard.annotate_data", "M", @progbits, 8; .long 912b - .; .long 1; .popsection
+.long 1b - .
.long .L457 - . #
.quad __tracepoint_read_msr+8 + 0 + 2 - . #,
.popsection
Josh Poimboeuf
maintainerRe: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 13 lines · Ingo Molnar
Quoted 11 lines · Linus Torvalds
Quoted 4 lines · On Wed, 3 Dec 2025 at 08:40, tip-bot2 for Josh Poimboeuf…
Consolidate
__ASM_ANNOTATEinto a single macro which is used by both C and asm. This also makes the code generation a bit more palatable by putting it all on a single line.No objections, but I just wanted to say that when stating "this makes the code generation more palatable", it would be good to actually show *how* it does it (with just an example).
Quoted 7 lines
Quoted 2 lines
Because it's hard to read that diff and figure out what the actual effect is. I can just about see it, but...
Sorry, should have added this to the changelog.
Find below a diff of the
arch/x86/kernel/process.soutput of your tree versus current tip:objtool/urgent.
It's still not exactly "pretty", but I'm looking again at how to make all that better... Hopefully we can get .macro working with Clang inline asm at some point.
Signature · 1 line
Josh
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
In reply to Ingo MolnarQuoted 3 lines · Ingo Molnar
Find below a diff of the
arch/x86/kernel/process.soutput of your tree versus current tip:objtool/urgent.
Yeah, just a single example would have been sufficient, ie a simple
Turn
911:
.pushsection .discard.annotate_insn,"M", @progbits, 8
.long 911b - .
.long 1
.popsection
jmp __x86_return_thunkInto
911: .pushsection ".discard.annotate_insn", "M", @progbits, 8;
.long 911b - .; .long 1; .popsection
jmp __x86_return_thunkand btw, the quotes around the section name are not necessary afaik.
Also, I have to say that being mergeable is a bit annoying here:
without that, we could drop the "@progbits, 8" parts too which is just strange noise. Is the mergeability really a win? Because I'd assume that it's never *actually* merged, since the expression "911b-." ends up being a unique value?
What am I missing? It *feels* like this should just all be
911: .pushsection .discard.annotate_insn ; .long 911b - .;
.long 1; .popsection
jmp __x86_return_thunkinstead. But it's entirely possible I'm not seeing the reason here...
Linus
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 7 lines · Linus Torvalds
It *feels* like this should just all be
911: .pushsection .discard.annotate_insn ; .long 911b - .; .long 1; .popsection jmp __x86_return_thunkinstead.
Actually, I think it should just be
911: jmp __x86_return_thunk
.pushsection .discard.annotate_insn ; .long 911b - . , 1; .popsection
but again: it's entirely possible that there's something I am missing.
Linus
Josh Poimboeuf
maintainerRe: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 8 lines · Linus Torvalds
Quoted 6 lines · Linus Torvalds
It *feels* like this should just all be
911: .pushsection .discard.annotate_insn ; .long 911b - .; .long 1; .popsection jmp __x86_return_thunk
Quoted 8 lines
Quoted 1 line
instead.
Actually, I think it should just be
911: jmp
__x86_return_thunk
.pushsection .discard.annotate_insn ; .long 911b - . , 1; .popsectionbut again: it's entirely possible that there's something I am missing.
Indeed, we can combine the longs (though see my other email for the explanation about the mergeable thing).
Signature · 1 line
Josh
Josh Poimboeuf
maintainerPATCH 1/1 objtool: More annotation code generation tweaks
Remove the superfluous section name quotes, and combine the longs into a single command.
Before:
911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 2; .popsection
After:
911: .pushsection .discard.annotate_insn, "M", @progbits, 8; .long 911b - ., 2; .popsection
--- include/linux/annotate.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
include/linux/annotate.h +6 -7
@@ -8,33 +8,32 @@#define __ASM_ANNOTATE (section, label, type) \ .pushsection section, "M", @progbits, 8; \ - .long label - .; \ - .long type; \ + .long label - ., type; \ .popsection#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) + __stringify(__ASM_ANNOTATE(.discard.annotate_insn, label, type))#define ASM_ANNOTATE (type) \ "911: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) + __stringify(__ASM_ANNOTATE(.discard.annotate_insn, 911b, type))#define ASM_ANNOTATE_DATA (type) \ "912: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) + __stringify(__ASM_ANNOTATE(.discard.annotate_data, 912b, type))#else /* __ASSEMBLY__ */ .macro ANNOTATE type .Lhere_\@: - __ASM_ANNOTATE(".discard.annotate_insn", .Lhere_\@, \type) + __ASM_ANNOTATE(.discard.annotate_insn, .Lhere_\@, \type) .endm .macro ANNOTATE_DATA type .Lhere_\@: - __ASM_ANNOTATE(".discard.annotate_data", .Lhere_\@, \type) + __ASM_ANNOTATE(.discard.annotate_data, .Lhere_\@, \type) .endm#endif /* __ASSEMBLY__ */
Signature · 1 line
2.51.1
[tip: objtool/urgent] objtool: Simplify .annotate_insn code generation output some more
The following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 2d3451ef1ef679ae496f8e335f4b1305885e8083 Gitweb: https://git.kernel.org/tip/2d3451ef1ef679ae496f8e335f4b1305885e8083 Author: Josh Poimboeuf <[email protected]> AuthorDate: Wed, 03 Dec 2025 10:07:38 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 19:45:29 +01:00
objtool: Simplify .annotate_insn code generation output some more
Remove the superfluous section name quotes, and combine the longs into a single command.
Before:
911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 2; .popsection
After:
911: .pushsection .discard.annotate_insn, "M", @progbits, 8; .long 911b - ., 2; .popsection
No change in functionality.
--- include/linux/annotate.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
include/linux/annotate.h +6 -7
@@ -8,33 +8,32 @@#define __ASM_ANNOTATE (section, label, type) \ .pushsection section, "M", @progbits, 8; \ - .long label - .; \ - .long type; \ + .long label - ., type; \ .popsection#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) + __stringify(__ASM_ANNOTATE(.discard.annotate_insn, label, type))#define ASM_ANNOTATE (type) \ "911: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) + __stringify(__ASM_ANNOTATE(.discard.annotate_insn, 911b, type))#define ASM_ANNOTATE_DATA (type) \ "912: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) + __stringify(__ASM_ANNOTATE(.discard.annotate_data, 912b, type))#else /* __ASSEMBLY__ */ .macro ANNOTATE type .Lhere_\@: - __ASM_ANNOTATE(".discard.annotate_insn", .Lhere_\@, \type) + __ASM_ANNOTATE(.discard.annotate_insn, .Lhere_\@, \type) .endm .macro ANNOTATE_DATA type .Lhere_\@: - __ASM_ANNOTATE(".discard.annotate_data", .Lhere_\@, \type) + __ASM_ANNOTATE(.discard.annotate_data, .Lhere_\@, \type) .endm#endif /* __ASSEMBLY__ */
Josh Poimboeuf
maintainerRe: [tip: objtool/urgent] objtool: Consolidate annotation macros
In reply to Linus TorvaldsQuoted 16 lines · Linus Torvalds
Quoted 3 lines · Ingo Molnar
Find below a diff of the
arch/x86/kernel/process.soutput of your tree versus current tip:objtool/urgent.Yeah, just a single example would have been sufficient, ie a simple
Turn 911: .pushsection .discard.annotate_insn,"M", @progbits, 8 .long 911b - . .long 1 .popsection jmp __x86_return_thunk
Quoted 7 lines
Into
911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 1; .popsection jmp __x86_return_thunkand btw, the quotes around the section name are not necessary afaik.
Indeed, I can remove those quotes.
Quoted 6 lines
Also, I have to say that being mergeable is a bit annoying here:
without that, we could drop the "@progbits, 8" parts too which is just strange noise. Is the mergeability really a win? Because I'd assume that it's never *actually* merged, since the expression "911b-." ends up being a unique value?
Quoted 7 lines
What am I missing? It *feels* like this should just all be
911: .pushsection .discard.annotate_insn ; .long 911b - .; .long 1; .popsection jmp __x86_return_thunkinstead. But it's entirely possible I'm not seeing the reason here...
So that mergeable thing is the only way to convince the toolchains to allow setting the section entsize, which is a generic way for objtool to look at the myriad of special sections and determine their entry sizes, so it can extract individual entries for the purposes of creating livepatch modules.
In this case I do realize the irony of objtool needing to know the section size of a section which is explicitly created for objtool's use (so of course it already knows the size).
In actuality they are two completely separate subcommands of objtool. "Regular" objtool reads .discard.annotate_insn for its annotations, whereas "objtool klp diff" extracts special section entries. It does so in a generic way (entsize), regardless of whether the special section is objtool-specific or not (e.g., the bug table).
Signature · 1 line
Josh
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 3 lines · Josh Poimboeuf
So that mergeable thing is the only way to convince the toolchains to allow setting the section entsize
Ugh. What a horrid reason. That *should* be trivially done by just having a linker script setting, but if one doesn't exist...
What are the actual entry sizes, though? Because maybe we could just use alignment instead - which is trivially settable in the linker script.
Linus
Josh Poimboeuf
maintainerRe: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Josh Poimboeuf
So that mergeable thing is the only way to convince the toolchains to allow setting the section entsize
Ugh. What a horrid reason. That *should* be trivially done by just having a linker script setting, but if one doesn't exist...
Believe me, I looked and there's surprisingly no way to do that from linker script.
Quoted 3 lines
What are the actual entry sizes, though? Because maybe we could just use alignment instead - which is trivially settable in the linker script.
That could work. At least .altinstructions (14 bytes) and __ex_table (12 bytes) aren't power of two.
We could certainly pad them, That does increase memory usage though. On my defconfig kernel that would add about ~11k.
Signature · 1 line
Josh
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
Quoted 10 lines · Josh Poimboeuf
Quoted 4 lines
What are the actual entry sizes, though? Because maybe we could just use alignment instead - which is trivially settable in the linker script.
That could work. At least .altinstructions (14 bytes) and
__ex_table(12 bytes) aren't power of two.We could certainly pad them, That does increase memory usage though. On my defconfig kernel that would add about ~11k.
Ok, if they aren't all naturally aligned, let's just keep with the horrid 'mergeable' thing for now.
It's not wonderful, but nobody sane looks at the generated asm anyway. And regardless, it's better than it used to be.
Linus
Re: [tip: objtool/urgent] objtool: Consolidate annotation macros
In reply to Linus TorvaldsQuoted 16 lines · Linus Torvalds
Quoted 3 lines · Ingo Molnar
Find below a diff of the
arch/x86/kernel/process.soutput of your tree versus current tip:objtool/urgent.Yeah, just a single example would have been sufficient, ie a simple
Turn 911: .pushsection .discard.annotate_insn,"M", @progbits, 8 .long 911b - . .long 1 .popsection jmp __x86_return_thunk
Quoted 5 lines
Into
911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 1; .popsection jmp __x86_return_thunk
I ended up rebasing the commit after all and added your example, because seeing it written out triggered further enhancements:
Quoted 8 lines
and btw, the quotes around the section name are not necessary afaik.
Also, I have to say that being mergeable is a bit annoying here:
without that, we could drop the "@progbits, 8" parts too which is just strange noise. Is the mergeability really a win? Because I'd assume that it's never *actually* merged, since the expression "911b-." ends up being a unique value?
Quoted 7 lines
What am I missing? It *feels* like this should just all be
911: .pushsection .discard.annotate_insn ; .long 911b - .; .long 1; .popsection jmp __x86_return_thunkinstead. But it's entirely possible I'm not seeing the reason here...
Thanks,
Ingo
[tip: objtool/urgent] objtool: Consolidate annotation macros
In reply to Josh PoimboeufThe following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 305c8dc477175eb29df18accc95c868acd2cdd4e Gitweb: https://git.kernel.org/tip/305c8dc477175eb29df18accc95c868acd2cdd4e Author: Josh Poimboeuf <[email protected]> AuthorDate: Tue, 02 Dec 2025 09:59:38 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 19:40:44 +01:00
objtool: Consolidate annotation macros
Consolidate __ASM_ANNOTATE into a single macro which is used by both C and asm. This also makes the code generation a bit more palatable by putting it all on a single line.
Turn this:
911: .pushsection .discard.annotate_insn,"M", @progbits, 8 .long 911b - . .long 1 .popsection jmp __x86_return_thunk
Into:
911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 1; .popsection jmp __x86_return_thunk
--- include/linux/annotate.h | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-)
include/linux/annotate.h +15 -21
@@ -6,41 +6,35 @@#ifdef CONFIG_OBJTOOL -#ifndef __ASSEMBLY__ -#define __ASM_ANNOTATE (section, label, type) \ - ".pushsection " section ",\"M\", @progbits, 8\n\t" \ - ".long " __stringify(label) " - .\n\t" \ - ".long " __stringify(type) "\n\t" \ - ".popsection\n\t" + .pushsection section, "M", @progbits, 8; \ + .long label - .; \ + .long type; \ + .popsection + +#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __ASM_ANNOTATE(".discard.annotate_insn", label, type) + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t"#define ASM_ANNOTATE (type) \ - "911:\n\t" \ - ASM_ANNOTATE_LABEL(911b, type) + "911: " \ + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t"#define ASM_ANNOTATE_DATA (type) \ - "912:\n\t" \ - __ASM_ANNOTATE(".discard.annotate_data", 912b, type) + "912: " \ + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t"#else /* __ASSEMBLY__ */ -.macro __ANNOTATE section, type -.Lhere_\@: - .pushsection \section, "M", @progbits, 8 - .long .Lhere_\@ - . - .long \type - .popsection -.endm - .macro ANNOTATE type - __ANNOTATE ".discard.annotate_insn", \type +.Lhere_\@: + __ASM_ANNOTATE(".discard.annotate_insn", .Lhere_\@, \type) .endm .macro ANNOTATE_DATA type - __ANNOTATE ".discard.annotate_data", \type +.Lhere_\@: + __ASM_ANNOTATE(".discard.annotate_data", .Lhere_\@, \type) .endm#endif /* __ASSEMBLY__ */
Josh Poimboeuf
maintainerPATCH v2 4/4 objtool: Remove newlines and tabs from annotation macros
In reply to Josh PoimboeufRemove newlines and tabs from the annotation macros so the invoking code can insert them as needed to match the style of the surrounding code.
--- arch/x86/include/asm/alternative.h | 2 +- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/jump_label.h | 2 +- arch/x86/include/asm/nospec-branch.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/include/asm/smap.h | 8 ++++---- arch/x86/include/asm/static_call.h | 2 +- arch/x86/kernel/alternative.c | 4 ++-- arch/x86/kernel/rethook.c | 2 +- arch/x86/kernel/static_call.c | 4 ++-- arch/x86/lib/error-inject.c | 2 +- include/linux/annotate.h | 6 +++--- include/linux/objtool.h | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-)
arch/x86/include/asm/alternative.h +1 -1
@@ -208,7 +208,7 @@ static inline int alternatives_text_reserved(void *start, void *end)#define ALTINSTR_REPLACEMENT (newinstr)/* replacement */ \ ".pushsection .altinstr_replacement, \"ax\"\n" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n" \ "# ALT: replacement\n" \ "774:\n\t" newinstr "\n775:\n" \ ".popsection\n"
arch/x86/include/asm/bug.h +1 -1
@@ -70,7 +70,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);#define _BUG_FLAGS_ASM (format, file, line, flags, size, extra) \ ".pushsection __bug_table,\"aw\"\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n\t" \ "2:\n\t" \ __BUG_ENTRY(format, file, line, flags) \ "\t.org 2b + " size "\n" \
arch/x86/include/asm/cpufeature.h +1 -1
@@ -101,7 +101,7 @@ static __always_inline bool _static_cpu_has(u16 bit) asm goto(ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]")".pushsection .altinstr_aux,\"ax\"\n" "6:\n" -ANNOTATE_DATA_SPECIAL +ANNOTATE_DATA_SPECIAL "\n" " testb %[bitnum], %a[cap_byte]\n" " jnz %l[t_yes]\n" " jmp %l[t_no]\n"
arch/x86/include/asm/irq_stack.h +1 -1
@@ -101,7 +101,7 @@#define ASM_CALL_ARG0 \ "1: call %c[__func] \n" \ - ANNOTATE_REACHABLE(1b) + ANNOTATE_REACHABLE(1b) " \n"#define ASM_CALL_ARG1 \ "movq %[arg1], %%rdi \n" \
arch/x86/include/asm/jump_label.h +1 -1
@@ -15,7 +15,7 @@#define JUMP_TABLE_ENTRY (key, label) \ ".pushsection __jump_table, \"aw\" \n\t" \ _ASM_ALIGN "\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n" \ ".long 1b - . \n\t" \ ".long " label " - . \n\t" \ _ASM_PTR " " key " - . \n\t" \
arch/x86/include/asm/nospec-branch.h +2 -2
@@ -464,7 +464,7 @@ static inline void call_depth_return_thunk(void) {}*/ # define CALL_NOSPEC \ ALTERNATIVE_2( \ - ANNOTATE_RETPOLINE_SAFE \ + ANNOTATE_RETPOLINE_SAFE "\n" \ "call *%[thunk_target]\n", \ " jmp 904f;\n" \ " .align 16\n" \
@@ -480,7 +480,7 @@ static inline void call_depth_return_thunk(void) {}"904: call 901b;\n" , \X86_FEATURE_RETPOLINE , \"lfence;\n" \ -ANNOTATE_RETPOLINE_SAFE \ +ANNOTATE_RETPOLINE_SAFE "\n" \"call *%[thunk_target]\n" , \ X86_FEATURE_RETPOLINE_LFENCE)
arch/x86/include/asm/paravirt_types.h +1 -1
@@ -249,7 +249,7 @@ extern struct paravirt_patch_template pv_ops;* don't need to bother with CFI prefixes. */ #define PARAVIRT_CALL \ - ANNOTATE_RETPOLINE_SAFE \ + ANNOTATE_RETPOLINE_SAFE "\n\t" \ "call *%[paravirt_opptr];"/*
arch/x86/include/asm/smap.h +4 -4
@@ -40,7 +40,7 @@ static __always_inline unsigned long smap_save(void)unsigned long flags; asmvolatile ("# smap_save\n\t" - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t""" ,"pushf; pop %0; clac" ,X86_FEATURE_SMAP ) : "=rm" (flags) : : "memory", "cc");
@@ -51,7 +51,7 @@ static __always_inline unsigned long smap_save(void) static __always_inline void smap_restore(unsigned long flags) { asm volatile ("# smap_restore\n\t" - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "", "push %0; popf", X86_FEATURE_SMAP) : : "g" (flags) : "memory", "cc");
@@ -64,9 +64,9 @@ static __always_inline void smap_restore(unsigned long flags) ALTERNATIVE("", "stac", X86_FEATURE_SMAP)#define ASM_CLAC_UNSAFE \ - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "clac", X86_FEATURE_SMAP) + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "clac", X86_FEATURE_SMAP)#define ASM_STAC_UNSAFE \ - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "stac", X86_FEATURE_SMAP) + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "stac", X86_FEATURE_SMAP)#endif /* __ASSEMBLER__ */
arch/x86/include/asm/static_call.h +1 -1
@@ -36,7 +36,7 @@".align 4 \n" \ ".globl " STATIC_CALL_TRAMP_STR(name) " \n" \ STATIC_CALL_TRAMP_STR(name) ": \n" \ -ANNOTATE_NOENDBR \ +ANNOTATE_NOENDBR " \n" \ insns" \n" \".byte 0x0f, 0xb9, 0xcc \n" \ ".type " STATIC_CALL_TRAMP_STR(name) ", @function \n" \
arch/x86/kernel/alternative.c +2 -2
@@ -2229,7 +2229,7 @@ asm (" .pushsection .init.text, \"ax\", @progbits\n" " .type int3_selftest_asm, @function\n" "int3_selftest_asm:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" /* * INT3 padded with NOP to CALL_INSN_SIZE. The INT3 triggers an * exception, then the int3_exception_nb notifier emulates a call to
@@ -2247,7 +2247,7 @@ asm (" .pushsection .init.text, \"ax\", @progbits\n" " .type int3_selftest_callee, @function\n" "int3_selftest_callee:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" " movl $0x1234, (%" _ASM_ARG1")\n" ASM_RET " .size int3_selftest_callee, . - int3_selftest_callee\n"
arch/x86/kernel/rethook.c +1 -1
@@ -25,7 +25,7 @@ asm(".type arch_rethook_trampoline, @function\n" "arch_rethook_trampoline:\n" #ifdef CONFIG_X86_64 -ANNOTATE_NOENDBR /* This is only jumped from ret instruction */ +ANNOTATE_NOENDBR "\n" /* This is only jumped from ret instruction */ /* Push a fake return address to tell the unwinder it's a rethook. */ " pushq $arch_rethook_trampoline\n" UNWIND_HINT_FUNC
arch/x86/kernel/static_call.c +2 -2
@@ -50,8 +50,8 @@ asm (".global __static_call_return\n\t"".type __static_call_return, @function\n\t" ASM_FUNC_ALIGN "\n\t" "__static_call_return:\n\t" -ANNOTATE_NOENDBR -ANNOTATE_RETPOLINE_SAFE +ANNOTATE_NOENDBR "\n\t" +ANNOTATE_RETPOLINE_SAFE "\n\t" "ret; int3\n\t" ".size __static_call_return, . - __static_call_return \n\t");
arch/x86/lib/error-inject.c +1 -1
@@ -13,7 +13,7 @@ asm(".globl just_return_func\n" ASM_FUNC_ALIGN "just_return_func:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" ASM_RET ".size just_return_func, .-just_return_func\n" );
include/linux/annotate.h +3 -3
@@ -15,15 +15,15 @@#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type))#define ASM_ANNOTATE (type) \ "911: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type))#define ASM_ANNOTATE_DATA (type) \ "912: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type))#else /* __ASSEMBLY__ */
include/linux/objtool.h +1 -1
@@ -12,7 +12,7 @@#define UNWIND_HINT (type, sp_reg, sp_offset, signal) \ "987: \n\t" \ ".pushsection .discard.unwind_hints\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n\t" \/* struct unwind_hint */ \".long 987b - .\n\t" \ ".short " __stringify(sp_offset) "\n\t" \
Signature · 1 line
2.51.1
[tip: objtool/urgent] objtool: Remove newlines and tabs from annotation macros
The following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 8d20ad6893d0c03eb009c984faeb25bc8cffda90 Gitweb: https://git.kernel.org/tip/8d20ad6893d0c03eb009c984faeb25bc8cffda90 Author: Josh Poimboeuf <[email protected]> AuthorDate: Tue, 02 Dec 2025 09:59:39 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 16:53:19 +01:00
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.
--- arch/x86/include/asm/alternative.h | 2 +- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/jump_label.h | 2 +- arch/x86/include/asm/nospec-branch.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/include/asm/smap.h | 8 ++++---- arch/x86/include/asm/static_call.h | 2 +- arch/x86/kernel/alternative.c | 4 ++-- arch/x86/kernel/rethook.c | 2 +- arch/x86/kernel/static_call.c | 4 ++-- arch/x86/lib/error-inject.c | 2 +- include/linux/annotate.h | 6 +++--- include/linux/objtool.h | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-)
arch/x86/include/asm/alternative.h +1 -1
@@ -208,7 +208,7 @@ static inline int alternatives_text_reserved(void *start, void *end)#define ALTINSTR_REPLACEMENT (newinstr)/* replacement */ \ ".pushsection .altinstr_replacement, \"ax\"\n" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n" \ "# ALT: replacement\n" \ "774:\n\t" newinstr "\n775:\n" \ ".popsection\n"
arch/x86/include/asm/bug.h +1 -1
@@ -70,7 +70,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);#define _BUG_FLAGS_ASM (format, file, line, flags, size, extra) \ ".pushsection __bug_table,\"aw\"\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n\t" \ "2:\n\t" \ __BUG_ENTRY(format, file, line, flags) \ "\t.org 2b + " size "\n" \
arch/x86/include/asm/cpufeature.h +1 -1
@@ -101,7 +101,7 @@ static __always_inline bool _static_cpu_has(u16 bit) asm goto(ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]")".pushsection .altinstr_aux,\"ax\"\n" "6:\n" -ANNOTATE_DATA_SPECIAL +ANNOTATE_DATA_SPECIAL "\n" " testb %[bitnum], %a[cap_byte]\n" " jnz %l[t_yes]\n" " jmp %l[t_no]\n"
arch/x86/include/asm/irq_stack.h +1 -1
@@ -101,7 +101,7 @@#define ASM_CALL_ARG0 \ "1: call %c[__func] \n" \ - ANNOTATE_REACHABLE(1b) + ANNOTATE_REACHABLE(1b) " \n"#define ASM_CALL_ARG1 \ "movq %[arg1], %%rdi \n" \
arch/x86/include/asm/jump_label.h +1 -1
@@ -15,7 +15,7 @@#define JUMP_TABLE_ENTRY (key, label) \ ".pushsection __jump_table, \"aw\" \n\t" \ _ASM_ALIGN "\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n" \ ".long 1b - . \n\t" \ ".long " label " - . \n\t" \ _ASM_PTR " " key " - . \n\t" \
arch/x86/include/asm/nospec-branch.h +2 -2
@@ -464,7 +464,7 @@ static inline void call_depth_return_thunk(void) {}*/ # define CALL_NOSPEC \ ALTERNATIVE_2( \ - ANNOTATE_RETPOLINE_SAFE \ + ANNOTATE_RETPOLINE_SAFE "\n" \ "call *%[thunk_target]\n", \ " jmp 904f;\n" \ " .align 16\n" \
@@ -480,7 +480,7 @@ static inline void call_depth_return_thunk(void) {}"904: call 901b;\n" , \X86_FEATURE_RETPOLINE , \"lfence;\n" \ -ANNOTATE_RETPOLINE_SAFE \ +ANNOTATE_RETPOLINE_SAFE "\n" \"call *%[thunk_target]\n" , \ X86_FEATURE_RETPOLINE_LFENCE)
arch/x86/include/asm/paravirt_types.h +1 -1
@@ -249,7 +249,7 @@ extern struct paravirt_patch_template pv_ops;* don't need to bother with CFI prefixes. */ #define PARAVIRT_CALL \ - ANNOTATE_RETPOLINE_SAFE \ + ANNOTATE_RETPOLINE_SAFE "\n\t" \ "call *%[paravirt_opptr];"/*
arch/x86/include/asm/smap.h +4 -4
@@ -40,7 +40,7 @@ static __always_inline unsigned long smap_save(void)unsigned long flags; asmvolatile ("# smap_save\n\t" - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t""" ,"pushf; pop %0; clac" ,X86_FEATURE_SMAP ) : "=rm" (flags) : : "memory", "cc");
@@ -51,7 +51,7 @@ static __always_inline unsigned long smap_save(void) static __always_inline void smap_restore(unsigned long flags) { asm volatile ("# smap_restore\n\t" - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "", "push %0; popf", X86_FEATURE_SMAP) : : "g" (flags) : "memory", "cc");
@@ -64,9 +64,9 @@ static __always_inline void smap_restore(unsigned long flags) ALTERNATIVE("", "stac", X86_FEATURE_SMAP)#define ASM_CLAC_UNSAFE \ - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "clac", X86_FEATURE_SMAP) + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "clac", X86_FEATURE_SMAP)#define ASM_STAC_UNSAFE \ - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "stac", X86_FEATURE_SMAP) + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "stac", X86_FEATURE_SMAP)#endif /* __ASSEMBLER__ */
arch/x86/include/asm/static_call.h +1 -1
@@ -36,7 +36,7 @@".align 4 \n" \ ".globl " STATIC_CALL_TRAMP_STR(name) " \n" \ STATIC_CALL_TRAMP_STR(name) ": \n" \ -ANNOTATE_NOENDBR \ +ANNOTATE_NOENDBR " \n" \ insns" \n" \".byte 0x0f, 0xb9, 0xcc \n" \ ".type " STATIC_CALL_TRAMP_STR(name) ", @function \n" \
arch/x86/kernel/alternative.c +2 -2
@@ -2229,7 +2229,7 @@ asm (" .pushsection .init.text, \"ax\", @progbits\n" " .type int3_selftest_asm, @function\n" "int3_selftest_asm:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" /* * INT3 padded with NOP to CALL_INSN_SIZE. The INT3 triggers an * exception, then the int3_exception_nb notifier emulates a call to
@@ -2247,7 +2247,7 @@ asm (" .pushsection .init.text, \"ax\", @progbits\n" " .type int3_selftest_callee, @function\n" "int3_selftest_callee:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" " movl $0x1234, (%" _ASM_ARG1")\n" ASM_RET " .size int3_selftest_callee, . - int3_selftest_callee\n"
arch/x86/kernel/rethook.c +1 -1
@@ -25,7 +25,7 @@ asm(".type arch_rethook_trampoline, @function\n" "arch_rethook_trampoline:\n" #ifdef CONFIG_X86_64 -ANNOTATE_NOENDBR /* This is only jumped from ret instruction */ +ANNOTATE_NOENDBR "\n" /* This is only jumped from ret instruction */ /* Push a fake return address to tell the unwinder it's a rethook. */ " pushq $arch_rethook_trampoline\n" UNWIND_HINT_FUNC
arch/x86/kernel/static_call.c +2 -2
@@ -50,8 +50,8 @@ asm (".global __static_call_return\n\t"".type __static_call_return, @function\n\t" ASM_FUNC_ALIGN "\n\t" "__static_call_return:\n\t" -ANNOTATE_NOENDBR -ANNOTATE_RETPOLINE_SAFE +ANNOTATE_NOENDBR "\n\t" +ANNOTATE_RETPOLINE_SAFE "\n\t" "ret; int3\n\t" ".size __static_call_return, . - __static_call_return \n\t");
arch/x86/lib/error-inject.c +1 -1
@@ -13,7 +13,7 @@ asm(".globl just_return_func\n" ASM_FUNC_ALIGN "just_return_func:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" ASM_RET ".size just_return_func, .-just_return_func\n" );
include/linux/annotate.h +3 -3
@@ -15,15 +15,15 @@#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type))#define ASM_ANNOTATE (type) \ "911: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type))#define ASM_ANNOTATE_DATA (type) \ "912: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type))#else /* __ASSEMBLY__ */
include/linux/objtool.h +1 -1
@@ -12,7 +12,7 @@#define UNWIND_HINT (type, sp_reg, sp_offset, signal) \ "987: \n\t" \ ".pushsection .discard.unwind_hints\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n\t" \/* struct unwind_hint */ \".long 987b - .\n\t" \ ".short " __stringify(sp_offset) "\n\t" \
[tip: objtool/urgent] objtool: Remove newlines and tabs from annotation macros
In reply to Josh PoimboeufThe following commit has been merged into the objtool/urgent branch of tip:
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: ed3bf863dc9150b56233b01ec073cbbd1fc9c6a3 Gitweb: https://git.kernel.org/tip/ed3bf863dc9150b56233b01ec073cbbd1fc9c6a3 Author: Josh Poimboeuf <[email protected]> AuthorDate: Tue, 02 Dec 2025 09:59:39 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 03 Dec 2025 19:42:37 +01:00
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.
--- arch/x86/include/asm/alternative.h | 2 +- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/jump_label.h | 2 +- arch/x86/include/asm/nospec-branch.h | 4 ++-- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/include/asm/smap.h | 8 ++++---- arch/x86/include/asm/static_call.h | 2 +- arch/x86/kernel/alternative.c | 4 ++-- arch/x86/kernel/rethook.c | 2 +- arch/x86/kernel/static_call.c | 4 ++-- arch/x86/lib/error-inject.c | 2 +- include/linux/annotate.h | 6 +++--- include/linux/objtool.h | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-)
arch/x86/include/asm/alternative.h +1 -1
@@ -208,7 +208,7 @@ static inline int alternatives_text_reserved(void *start, void *end)#define ALTINSTR_REPLACEMENT (newinstr)/* replacement */ \ ".pushsection .altinstr_replacement, \"ax\"\n" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n" \ "# ALT: replacement\n" \ "774:\n\t" newinstr "\n775:\n" \ ".popsection\n"
arch/x86/include/asm/bug.h +1 -1
@@ -70,7 +70,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);#define _BUG_FLAGS_ASM (format, file, line, flags, size, extra) \ ".pushsection __bug_table,\"aw\"\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n\t" \ "2:\n\t" \ __BUG_ENTRY(format, file, line, flags) \ "\t.org 2b + " size "\n" \
arch/x86/include/asm/cpufeature.h +1 -1
@@ -101,7 +101,7 @@ static __always_inline bool _static_cpu_has(u16 bit) asm goto(ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]")".pushsection .altinstr_aux,\"ax\"\n" "6:\n" -ANNOTATE_DATA_SPECIAL +ANNOTATE_DATA_SPECIAL "\n" " testb %[bitnum], %a[cap_byte]\n" " jnz %l[t_yes]\n" " jmp %l[t_no]\n"
arch/x86/include/asm/irq_stack.h +1 -1
@@ -101,7 +101,7 @@#define ASM_CALL_ARG0 \ "1: call %c[__func] \n" \ - ANNOTATE_REACHABLE(1b) + ANNOTATE_REACHABLE(1b) " \n"#define ASM_CALL_ARG1 \ "movq %[arg1], %%rdi \n" \
arch/x86/include/asm/jump_label.h +1 -1
@@ -15,7 +15,7 @@#define JUMP_TABLE_ENTRY (key, label) \ ".pushsection __jump_table, \"aw\" \n\t" \ _ASM_ALIGN "\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n" \ ".long 1b - . \n\t" \ ".long " label " - . \n\t" \ _ASM_PTR " " key " - . \n\t" \
arch/x86/include/asm/nospec-branch.h +2 -2
@@ -464,7 +464,7 @@ static inline void call_depth_return_thunk(void) {}*/ # define CALL_NOSPEC \ ALTERNATIVE_2( \ - ANNOTATE_RETPOLINE_SAFE \ + ANNOTATE_RETPOLINE_SAFE "\n" \ "call *%[thunk_target]\n", \ " jmp 904f;\n" \ " .align 16\n" \
@@ -480,7 +480,7 @@ static inline void call_depth_return_thunk(void) {}"904: call 901b;\n" , \X86_FEATURE_RETPOLINE , \"lfence;\n" \ -ANNOTATE_RETPOLINE_SAFE \ +ANNOTATE_RETPOLINE_SAFE "\n" \"call *%[thunk_target]\n" , \ X86_FEATURE_RETPOLINE_LFENCE)
arch/x86/include/asm/paravirt_types.h +1 -1
@@ -249,7 +249,7 @@ extern struct paravirt_patch_template pv_ops;* don't need to bother with CFI prefixes. */ #define PARAVIRT_CALL \ - ANNOTATE_RETPOLINE_SAFE \ + ANNOTATE_RETPOLINE_SAFE "\n\t" \ "call *%[paravirt_opptr];"/*
arch/x86/include/asm/smap.h +4 -4
@@ -40,7 +40,7 @@ static __always_inline unsigned long smap_save(void)unsigned long flags; asmvolatile ("# smap_save\n\t" - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t""" ,"pushf; pop %0; clac" ,X86_FEATURE_SMAP ) : "=rm" (flags) : : "memory", "cc");
@@ -51,7 +51,7 @@ static __always_inline unsigned long smap_save(void) static __always_inline void smap_restore(unsigned long flags) { asm volatile ("# smap_restore\n\t" - ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE + ALTERNATIVE(ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "", "push %0; popf", X86_FEATURE_SMAP) : : "g" (flags) : "memory", "cc");
@@ -64,9 +64,9 @@ static __always_inline void smap_restore(unsigned long flags) ALTERNATIVE("", "stac", X86_FEATURE_SMAP)#define ASM_CLAC_UNSAFE \ - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "clac", X86_FEATURE_SMAP) + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "clac", X86_FEATURE_SMAP)#define ASM_STAC_UNSAFE \ - ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "stac", X86_FEATURE_SMAP) + ALTERNATIVE("", ANNOTATE_IGNORE_ALTERNATIVE "\n\t" "stac", X86_FEATURE_SMAP)#endif /* __ASSEMBLER__ */
arch/x86/include/asm/static_call.h +1 -1
@@ -36,7 +36,7 @@".align 4 \n" \ ".globl " STATIC_CALL_TRAMP_STR(name) " \n" \ STATIC_CALL_TRAMP_STR(name) ": \n" \ -ANNOTATE_NOENDBR \ +ANNOTATE_NOENDBR " \n" \ insns" \n" \".byte 0x0f, 0xb9, 0xcc \n" \ ".type " STATIC_CALL_TRAMP_STR(name) ", @function \n" \
arch/x86/kernel/alternative.c +2 -2
@@ -2229,7 +2229,7 @@ asm (" .pushsection .init.text, \"ax\", @progbits\n" " .type int3_selftest_asm, @function\n" "int3_selftest_asm:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" /* * INT3 padded with NOP to CALL_INSN_SIZE. The INT3 triggers an * exception, then the int3_exception_nb notifier emulates a call to
@@ -2247,7 +2247,7 @@ asm (" .pushsection .init.text, \"ax\", @progbits\n" " .type int3_selftest_callee, @function\n" "int3_selftest_callee:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" " movl $0x1234, (%" _ASM_ARG1")\n" ASM_RET " .size int3_selftest_callee, . - int3_selftest_callee\n"
arch/x86/kernel/rethook.c +1 -1
@@ -25,7 +25,7 @@ asm(".type arch_rethook_trampoline, @function\n" "arch_rethook_trampoline:\n" #ifdef CONFIG_X86_64 -ANNOTATE_NOENDBR /* This is only jumped from ret instruction */ +ANNOTATE_NOENDBR "\n" /* This is only jumped from ret instruction */ /* Push a fake return address to tell the unwinder it's a rethook. */ " pushq $arch_rethook_trampoline\n" UNWIND_HINT_FUNC
arch/x86/kernel/static_call.c +2 -2
@@ -50,8 +50,8 @@ asm (".global __static_call_return\n\t"".type __static_call_return, @function\n\t" ASM_FUNC_ALIGN "\n\t" "__static_call_return:\n\t" -ANNOTATE_NOENDBR -ANNOTATE_RETPOLINE_SAFE +ANNOTATE_NOENDBR "\n\t" +ANNOTATE_RETPOLINE_SAFE "\n\t" "ret; int3\n\t" ".size __static_call_return, . - __static_call_return \n\t");
arch/x86/lib/error-inject.c +1 -1
@@ -13,7 +13,7 @@ asm(".globl just_return_func\n" ASM_FUNC_ALIGN "just_return_func:\n" -ANNOTATE_NOENDBR +ANNOTATE_NOENDBR "\n" ASM_RET ".size just_return_func, .-just_return_func\n" );
include/linux/annotate.h +3 -3
@@ -15,15 +15,15 @@#ifndef __ASSEMBLY__#define ASM_ANNOTATE_LABEL (label, type) \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type))#define ASM_ANNOTATE (type) \ "911: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type))#define ASM_ANNOTATE_DATA (type) \ "912: " \ - __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type)) "\n\t" + __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type))#else /* __ASSEMBLY__ */
include/linux/objtool.h +1 -1
@@ -12,7 +12,7 @@#define UNWIND_HINT (type, sp_reg, sp_offset, signal) \ "987: \n\t" \ ".pushsection .discard.unwind_hints\n\t" \ - ANNOTATE_DATA_SPECIAL \ + ANNOTATE_DATA_SPECIAL "\n\t" \/* struct unwind_hint */ \".long 987b - .\n\t" \ ".short " __stringify(sp_offset) "\n\t" \