frame.h 774 B

123456789101112131415161718192021222324
  1. #ifndef _LINUX_FRAME_H
  2. #define _LINUX_FRAME_H
  3. #ifdef CONFIG_STACK_VALIDATION
  4. /*
  5. * This macro marks the given function's stack frame as "non-standard", which
  6. * tells objtool to ignore the function when doing stack metadata validation.
  7. * It should only be used in special cases where you're 100% sure it won't
  8. * affect the reliability of frame pointers and kernel stack traces.
  9. *
  10. * For more information, see tools/objtool/Documentation/stack-validation.txt.
  11. */
  12. #define STACK_FRAME_NON_STANDARD(func) \
  13. static void __used __section(.discard.func_stack_frame_non_standard) \
  14. *__func_stack_frame_non_standard_##func = func
  15. #else /* !CONFIG_STACK_VALIDATION */
  16. #define STACK_FRAME_NON_STANDARD(func)
  17. #endif /* CONFIG_STACK_VALIDATION */
  18. #endif /* _LINUX_FRAME_H */