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

Configure Feed

Select the types of activity you want to include in your feed.

x86/asm: Annotate special section entries

In preparation for the objtool klp diff subcommand, add annotations for
special section entries. This will enable objtool to determine the size
and location of the entries and to extract them when needed.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

+15 -1
+4
arch/x86/include/asm/alternative.h
··· 198 198 199 199 #define ALTINSTR_ENTRY(ft_flags) \ 200 200 ".pushsection .altinstructions,\"a\"\n" \ 201 + ANNOTATE_DATA_SPECIAL \ 201 202 " .long 771b - .\n" /* label */ \ 202 203 " .long 774f - .\n" /* new instruction */ \ 203 204 " .4byte " __stringify(ft_flags) "\n" /* feature + flags */ \ ··· 208 207 209 208 #define ALTINSTR_REPLACEMENT(newinstr) /* replacement */ \ 210 209 ".pushsection .altinstr_replacement, \"ax\"\n" \ 210 + ANNOTATE_DATA_SPECIAL \ 211 211 "# ALT: replacement\n" \ 212 212 "774:\n\t" newinstr "\n775:\n" \ 213 213 ".popsection\n" ··· 339 337 * instruction. See apply_alternatives(). 340 338 */ 341 339 .macro altinstr_entry orig alt ft_flags orig_len alt_len 340 + ANNOTATE_DATA_SPECIAL 342 341 .long \orig - . 343 342 .long \alt - . 344 343 .4byte \ft_flags ··· 368 365 .popsection ; \ 369 366 .pushsection .altinstr_replacement,"ax" ; \ 370 367 743: \ 368 + ANNOTATE_DATA_SPECIAL ; \ 371 369 newinst ; \ 372 370 744: \ 373 371 .popsection ;
+5
arch/x86/include/asm/asm.h
··· 2 2 #ifndef _ASM_X86_ASM_H 3 3 #define _ASM_X86_ASM_H 4 4 5 + #include <linux/annotate.h> 6 + 5 7 #ifdef __ASSEMBLER__ 6 8 # define __ASM_FORM(x, ...) x,## __VA_ARGS__ 7 9 # define __ASM_FORM_RAW(x, ...) x,## __VA_ARGS__ ··· 134 132 # define _ASM_EXTABLE_TYPE(from, to, type) \ 135 133 .pushsection "__ex_table","a" ; \ 136 134 .balign 4 ; \ 135 + ANNOTATE_DATA_SPECIAL ; \ 137 136 .long (from) - . ; \ 138 137 .long (to) - . ; \ 139 138 .long type ; \ ··· 182 179 # define _ASM_EXTABLE_TYPE(from, to, type) \ 183 180 " .pushsection \"__ex_table\",\"a\"\n" \ 184 181 " .balign 4\n" \ 182 + ANNOTATE_DATA_SPECIAL \ 185 183 " .long (" #from ") - .\n" \ 186 184 " .long (" #to ") - .\n" \ 187 185 " .long " __stringify(type) " \n" \ ··· 191 187 # define _ASM_EXTABLE_TYPE_REG(from, to, type, reg) \ 192 188 " .pushsection \"__ex_table\",\"a\"\n" \ 193 189 " .balign 4\n" \ 190 + ANNOTATE_DATA_SPECIAL \ 194 191 " .long (" #from ") - .\n" \ 195 192 " .long (" #to ") - .\n" \ 196 193 DEFINE_EXTABLE_TYPE_REG \
+1
arch/x86/include/asm/bug.h
··· 57 57 #define _BUG_FLAGS_ASM(ins, file, line, flags, size, extra) \ 58 58 "1:\t" ins "\n" \ 59 59 ".pushsection __bug_table,\"aw\"\n" \ 60 + ANNOTATE_DATA_SPECIAL \ 60 61 __BUG_ENTRY(file, line, flags) \ 61 62 "\t.org 2b + " size "\n" \ 62 63 ".popsection\n" \
+1
arch/x86/include/asm/cpufeature.h
··· 101 101 asm goto(ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]") 102 102 ".pushsection .altinstr_aux,\"ax\"\n" 103 103 "6:\n" 104 + ANNOTATE_DATA_SPECIAL 104 105 " testb %[bitnum], %a[cap_byte]\n" 105 106 " jnz %l[t_yes]\n" 106 107 " jmp %l[t_no]\n"
+1
arch/x86/include/asm/jump_label.h
··· 15 15 #define JUMP_TABLE_ENTRY(key, label) \ 16 16 ".pushsection __jump_table, \"aw\" \n\t" \ 17 17 _ASM_ALIGN "\n\t" \ 18 + ANNOTATE_DATA_SPECIAL \ 18 19 ".long 1b - . \n\t" \ 19 20 ".long " label " - . \n\t" \ 20 21 _ASM_PTR " " key " - . \n\t" \
+3 -1
include/linux/objtool.h
··· 9 9 10 10 #ifndef __ASSEMBLY__ 11 11 12 - #define UNWIND_HINT(type, sp_reg, sp_offset, signal) \ 12 + #define UNWIND_HINT(type, sp_reg, sp_offset, signal) \ 13 13 "987: \n\t" \ 14 14 ".pushsection .discard.unwind_hints\n\t" \ 15 + ANNOTATE_DATA_SPECIAL \ 15 16 /* struct unwind_hint */ \ 16 17 ".long 987b - .\n\t" \ 17 18 ".short " __stringify(sp_offset) "\n\t" \ ··· 79 78 .macro UNWIND_HINT type:req sp_reg=0 sp_offset=0 signal=0 80 79 .Lhere_\@: 81 80 .pushsection .discard.unwind_hints 81 + ANNOTATE_DATA_SPECIAL 82 82 /* struct unwind_hint */ 83 83 .long .Lhere_\@ - . 84 84 .short \sp_offset