Loading arch/x86/include/asm/bug.h +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #include <linux/stringify.h> #include <linux/instrumentation.h> #include <linux/objtool.h> /* * Despite that some emulators terminate on UD2, we use it for WARN(). Loading arch/x86/include/asm/irq_stack.h +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ #define _ASM_X86_IRQ_STACK_H #include <linux/ptrace.h> #include <linux/objtool.h> #include <asm/processor.h> Loading include/linux/compiler.h +0 −7 Original line number Diff line number Diff line Loading @@ -125,18 +125,11 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, }) #define annotate_unreachable() __annotate_unreachable(__COUNTER__) #define ASM_REACHABLE \ "998:\n\t" \ ".pushsection .discard.reachable\n\t" \ ".long 998b - .\n\t" \ ".popsection\n\t" /* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(".rodata..c_jump_table") #else #define annotate_unreachable() # define ASM_REACHABLE #define __annotate_jump_table #endif Loading include/linux/objtool.h +16 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,12 @@ struct unwind_hint { _ASM_PTR " 986b\n\t" \ ".popsection\n\t" #define ASM_REACHABLE \ "998:\n\t" \ ".pushsection .discard.reachable\n\t" \ ".long 998b - .\n\t" \ ".popsection\n\t" #else /* __ASSEMBLY__ */ /* Loading Loading @@ -142,6 +148,13 @@ struct unwind_hint { .popsection .endm .macro REACHABLE .Lhere_\@: .pushsection .discard.reachable .long .Lhere_\@ - . .popsection .endm #endif /* __ASSEMBLY__ */ #else /* !CONFIG_STACK_VALIDATION */ Loading @@ -153,6 +166,7 @@ struct unwind_hint { #define STACK_FRAME_NON_STANDARD(func) #define STACK_FRAME_NON_STANDARD_FP(func) #define ANNOTATE_NOENDBR #define ASM_REACHABLE #else #define ANNOTATE_INTRA_FUNCTION_CALL .macro UNWIND_HINT sp_reg:req sp_offset=0 type:req end=0 Loading @@ -161,6 +175,8 @@ struct unwind_hint { .endm .macro ANNOTATE_NOENDBR .endm .macro REACHABLE .endm #endif #endif /* CONFIG_STACK_VALIDATION */ Loading tools/include/linux/objtool.h +16 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,12 @@ struct unwind_hint { _ASM_PTR " 986b\n\t" \ ".popsection\n\t" #define ASM_REACHABLE \ "998:\n\t" \ ".pushsection .discard.reachable\n\t" \ ".long 998b - .\n\t" \ ".popsection\n\t" #else /* __ASSEMBLY__ */ /* Loading Loading @@ -142,6 +148,13 @@ struct unwind_hint { .popsection .endm .macro REACHABLE .Lhere_\@: .pushsection .discard.reachable .long .Lhere_\@ - . .popsection .endm #endif /* __ASSEMBLY__ */ #else /* !CONFIG_STACK_VALIDATION */ Loading @@ -153,6 +166,7 @@ struct unwind_hint { #define STACK_FRAME_NON_STANDARD(func) #define STACK_FRAME_NON_STANDARD_FP(func) #define ANNOTATE_NOENDBR #define ASM_REACHABLE #else #define ANNOTATE_INTRA_FUNCTION_CALL .macro UNWIND_HINT sp_reg:req sp_offset=0 type:req end=0 Loading @@ -161,6 +175,8 @@ struct unwind_hint { .endm .macro ANNOTATE_NOENDBR .endm .macro REACHABLE .endm #endif #endif /* CONFIG_STACK_VALIDATION */ Loading Loading
arch/x86/include/asm/bug.h +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #include <linux/stringify.h> #include <linux/instrumentation.h> #include <linux/objtool.h> /* * Despite that some emulators terminate on UD2, we use it for WARN(). Loading
arch/x86/include/asm/irq_stack.h +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ #define _ASM_X86_IRQ_STACK_H #include <linux/ptrace.h> #include <linux/objtool.h> #include <asm/processor.h> Loading
include/linux/compiler.h +0 −7 Original line number Diff line number Diff line Loading @@ -125,18 +125,11 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, }) #define annotate_unreachable() __annotate_unreachable(__COUNTER__) #define ASM_REACHABLE \ "998:\n\t" \ ".pushsection .discard.reachable\n\t" \ ".long 998b - .\n\t" \ ".popsection\n\t" /* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(".rodata..c_jump_table") #else #define annotate_unreachable() # define ASM_REACHABLE #define __annotate_jump_table #endif Loading
include/linux/objtool.h +16 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,12 @@ struct unwind_hint { _ASM_PTR " 986b\n\t" \ ".popsection\n\t" #define ASM_REACHABLE \ "998:\n\t" \ ".pushsection .discard.reachable\n\t" \ ".long 998b - .\n\t" \ ".popsection\n\t" #else /* __ASSEMBLY__ */ /* Loading Loading @@ -142,6 +148,13 @@ struct unwind_hint { .popsection .endm .macro REACHABLE .Lhere_\@: .pushsection .discard.reachable .long .Lhere_\@ - . .popsection .endm #endif /* __ASSEMBLY__ */ #else /* !CONFIG_STACK_VALIDATION */ Loading @@ -153,6 +166,7 @@ struct unwind_hint { #define STACK_FRAME_NON_STANDARD(func) #define STACK_FRAME_NON_STANDARD_FP(func) #define ANNOTATE_NOENDBR #define ASM_REACHABLE #else #define ANNOTATE_INTRA_FUNCTION_CALL .macro UNWIND_HINT sp_reg:req sp_offset=0 type:req end=0 Loading @@ -161,6 +175,8 @@ struct unwind_hint { .endm .macro ANNOTATE_NOENDBR .endm .macro REACHABLE .endm #endif #endif /* CONFIG_STACK_VALIDATION */ Loading
tools/include/linux/objtool.h +16 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,12 @@ struct unwind_hint { _ASM_PTR " 986b\n\t" \ ".popsection\n\t" #define ASM_REACHABLE \ "998:\n\t" \ ".pushsection .discard.reachable\n\t" \ ".long 998b - .\n\t" \ ".popsection\n\t" #else /* __ASSEMBLY__ */ /* Loading Loading @@ -142,6 +148,13 @@ struct unwind_hint { .popsection .endm .macro REACHABLE .Lhere_\@: .pushsection .discard.reachable .long .Lhere_\@ - . .popsection .endm #endif /* __ASSEMBLY__ */ #else /* !CONFIG_STACK_VALIDATION */ Loading @@ -153,6 +166,7 @@ struct unwind_hint { #define STACK_FRAME_NON_STANDARD(func) #define STACK_FRAME_NON_STANDARD_FP(func) #define ANNOTATE_NOENDBR #define ASM_REACHABLE #else #define ANNOTATE_INTRA_FUNCTION_CALL .macro UNWIND_HINT sp_reg:req sp_offset=0 type:req end=0 Loading @@ -161,6 +175,8 @@ struct unwind_hint { .endm .macro ANNOTATE_NOENDBR .endm .macro REACHABLE .endm #endif #endif /* CONFIG_STACK_VALIDATION */ Loading