Commit 9a99417a authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar

objtool: Add STACK_FRAME_NON_STANDARD() macro

Add a new macro, STACK_FRAME_NON_STANDARD(), which is used to denote a
function which does something unusual related to its stack frame.  Use
of the macro prevents objtool from emitting a false positive warning.
Signed-off-by: default avatarJosh Poimboeuf <>
Cc: Andrew Morton <>
Cc: Andy Lutomirski <>
Cc: Arnaldo Carvalho de Melo <>
Cc: Bernd Petrovitsch <>
Cc: Borislav Petkov <>
Cc: Chris J Arges <>
Cc: Jiri Slaby <>
Cc: Linus Torvalds <>
Cc: Michal Marek <>
Cc: Namhyung Kim <>
Cc: Pedro Alves <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Link: default avatarIngo Molnar <>
parent c0dd6716
......@@ -343,7 +343,10 @@ SECTIONS
/* Sections to be discarded */
/DISCARD/ : { *(.eh_frame) }
#ifndef _LINUX_FRAME_H
#define _LINUX_FRAME_H
* This macro marks the given function's stack frame as "non-standard", which
* tells objtool to ignore the function when doing stack metadata validation.
* It should only be used in special cases where you're 100% sure it won't
* affect the reliability of frame pointers and kernel stack traces.
* For more information, see tools/objtool/Documentation/stack-validation.txt.
static void __used __section(__func_stack_frame_non_standard) \
*__func_stack_frame_non_standard_##func = func
#endif /* _LINUX_FRAME_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment