linux-stable/tools/include
Josh Poimboeuf ead1da2bba x86/ftrace: Remove OBJECT_FILES_NON_STANDARD usage
[ Upstream commit 7b6c7a877c ]

The file-wide OBJECT_FILES_NON_STANDARD annotation is used with
CONFIG_FRAME_POINTER to tell objtool to skip the entire file when frame
pointers are enabled.  However that annotation is now deprecated because
it doesn't work with IBT, where objtool runs on vmlinux.o instead of
individual translation units.

Instead, use more fine-grained function-specific annotations:

- The 'save_mcount_regs' macro does funny things with the frame pointer.
  Use STACK_FRAME_NON_STANDARD_FP to tell objtool to ignore the
  functions using it.

- The return_to_handler() "function" isn't actually a callable function.
  Instead of being called, it's returned to.  The real return address
  isn't on the stack, so unwinding is already doomed no matter which
  unwinder is used.  So just remove the STT_FUNC annotation, telling
  objtool to ignore it.  That also removes the implicit
  ANNOTATE_NOENDBR, which now needs to be made explicit.

Fixes the following warning:

  vmlinux.o: warning: objtool: __fentry__+0x16: return with modified stack frame

Fixes: ed53a0d971 ("x86/alternative: Use .ibt_endbr_seal to seal indirect calls")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/b7a7a42fe306aca37826043dac89e113a1acdbac.1654268610.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:28:03 +02:00
..
asm nds32: Remove the architecture 2022-03-07 13:54:59 +01:00
asm-generic tools: sync tools/bitmap with mother linux 2022-01-15 08:47:31 -08:00
linux x86/ftrace: Remove OBJECT_FILES_NON_STANDARD usage 2022-06-22 14:28:03 +02:00
nolibc tools/nolibc: Implement gettid() 2021-11-30 17:26:42 -08:00
tools tools: bpf: fix license for a compat header file 2018-09-19 23:49:58 +02:00
trace/events
uapi tools headers UAPI: Sync linux/kvm.h with the kernel sources 2022-05-08 21:48:49 -03:00
vdso tools headers: Synchronize linux/bits.h with the kernel sources 2020-04-14 11:40:05 -03:00