linux-stable/tools/include/linux
Josh Poimboeuf 7b6c7a877c x86/ftrace: Remove OBJECT_FILES_NON_STANDARD usage
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
2022-06-06 11:50:22 -07:00
..
sched
unaligned License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arm-smccc.h tools: Import ARM SMCCC definitions 2022-05-03 21:30:19 +01:00
atomic.h tools/include: Update atomic definitions 2022-02-20 08:44:37 +02:00
bitmap.h bitmap: Fix return values to be unsigned 2022-06-03 06:52:58 -07:00
bitops.h bitops: more BITS_TO_* macros 2020-02-04 03:05:26 +00:00
bits.h linux/bits.h: fix compilation error with GENMASK 2021-05-22 15:09:07 -10:00
btf_ids.h btf: Add BTF_ID_LIST_SINGLE macro 2020-09-21 15:00:40 -07:00
bug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
build_bug.h tools headers: Syncronize linux/build_bug.h with the kernel sources 2021-01-15 16:31:46 -03:00
cache.h tools/include: Add cache.h stub 2022-02-20 08:44:37 +02:00
compiler-gcc.h tools: compiler-gcc.h: Guard error attribute use with __has_attribute 2021-09-13 15:51:41 -07:00
compiler.h tools compiler.h: Remove duplicate #ifndef noinline block 2022-03-12 11:00:57 -03:00
compiler_types.h tools: Add sparse context/locking annotations in compiler-types.h 2021-08-19 15:39:22 -03:00
const.h linux/bits.h: fix compilation error with GENMASK 2021-05-22 15:09:07 -10:00
coresight-pmu.h perf cs-etm: Update deduction of TRCCONFIGR register for branch broadcast 2022-02-15 17:15:32 -03:00
ctype.h tools headers: Update linux/ctype.h with the kernel sources 2020-12-18 17:32:28 -03:00
debugfs.h tools/include: Add debugfs.h stub 2022-02-20 08:44:37 +02:00
delay.h
err.h docs: fix broken documentation links 2019-06-08 13:42:13 -06:00
export.h module: remove EXPORT_UNUSED_SYMBOL* 2021-02-08 12:28:07 +01:00
filter.h bpf: Add bitwise atomic instructions 2021-01-14 18:34:29 -08:00
find.h tools: sync tools/bitmap with mother linux 2022-01-15 08:47:31 -08:00
ftrace.h
gfp.h tools: Move gfp.h and slab.h from radix-tree to lib 2022-02-20 08:44:37 +02:00
hash.h hash.h: remove unused define directive 2022-01-20 08:52:54 +02:00
hashtable.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
interrupt.h
io.h tools/include: Add io.h stub 2022-02-20 08:44:37 +02:00
jhash.h tools/: replace HTTP links with HTTPS ones 2020-08-07 11:33:21 -07:00
kallsyms.h kallsyms/printk: add loglvl to print_ip_sym() 2020-06-09 09:39:10 -07:00
kconfig.h tools headers: Remove broken definition of __LITTLE_ENDIAN 2021-07-14 14:39:36 -03:00
kern_levels.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kernel.h tools/include: Add _RET_IP_ and math definitions to kernel.h 2022-02-20 08:44:37 +02:00
linkage.h
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
list_sort.h tools lib: Adopt list_sort() from the kernel sources 2021-10-20 10:30:59 -03:00
log2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
math.h tools: Fix math.h breakage 2021-11-30 09:14:42 -08:00
math64.h tools include: Add an initial math64.h 2021-04-15 16:38:02 -03:00
mm.h tools/include: Add mm.h file 2022-02-20 08:44:37 +02:00
module.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mutex.h
nmi.h tools/lib/lockdep: Add empty nmi.h 2018-09-10 13:48:23 +02:00
numa.h tools/: replace open encodings for NUMA_NO_NODE 2019-03-05 21:07:14 -08:00
objtool.h x86/ftrace: Remove OBJECT_FILES_NON_STANDARD usage 2022-06-06 11:50:22 -07:00
overflow.h compiler.h: drop fallback overflow checkers 2021-09-13 10:18:28 -07:00
pfn.h tools/include: Add pfn.h stub 2022-02-20 08:44:37 +02:00
poison.h mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO 2020-12-15 12:13:46 -08:00
rbtree.h rbtree: Add generic add and find helpers 2021-02-17 14:07:31 +01:00
rbtree_augmented.h docs: Add rbtree documentation to the core-api 2020-04-21 10:29:19 -06:00
rcu.h rcu: Don't return a value from rcu_assign_pointer() 2019-06-13 15:38:34 -07:00
refcount.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ring_buffer.h tools headers: Add missing perf_event.h include 2019-08-22 11:12:36 -03:00
seq_file.h
sizes.h tools: bpftool: add "prog run" subcommand to test-run programs 2019-07-05 23:48:07 +02:00
slab.h tools: Add kmem_cache_alloc_lru() 2022-04-22 14:24:28 -04:00
spinlock.h tools/lib/lockdep: drop leftover liblockdep headers 2021-12-09 09:37:49 -08:00
static_call_types.h static_call: Move struct static_call_key definition to static_call_types.h 2021-03-11 16:04:39 +01:00
string.h tools lib: Adopt memchr_inv() from kernel 2020-11-27 08:34:52 -03:00
stringify.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
time64.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
types.h memblock: test suite and a small cleanup 2022-03-27 13:36:06 -07:00
zalloc.h tools lib: Adopt zalloc()/zfree() from tools/perf 2019-07-09 10:13:26 -03:00