mirror-linux/arch/x86
Josh Poimboeuf 2cbb20b008 tracing: Disable branch profiling in noinstr code
CONFIG_TRACE_BRANCH_PROFILING inserts a call to ftrace_likely_update()
for each use of likely() or unlikely().  That breaks noinstr rules if
the affected function is annotated as noinstr.

Disable branch profiling for files with noinstr functions.  In addition
to some individual files, this also includes the entire arch/x86
subtree, as well as the kernel/entry, drivers/cpuidle, and drivers/idle
directories, all of which are noinstr-heavy.

Due to the nature of how sched binaries are built by combining multiple
.c files into one, branch profiling is disabled more broadly across the
sched code than would otherwise be needed.

This fixes many warnings like the following:

  vmlinux.o: warning: objtool: do_syscall_64+0x40: call to ftrace_likely_update() leaves .noinstr.text section
  vmlinux.o: warning: objtool: __rdgsbase_inactive+0x33: call to ftrace_likely_update() leaves .noinstr.text section
  vmlinux.o: warning: objtool: handle_bug.isra.0+0x198: call to ftrace_likely_update() leaves .noinstr.text section
  ...

Reported-by: Ingo Molnar <mingo@kernel.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/fb94fc9303d48a5ed370498f54500cc4c338eb6d.1742586676.git.jpoimboe@kernel.org
2025-03-22 09:49:26 +01:00
..
boot x86/boot: Sanitize boot params before parsing command line 2025-03-06 22:02:39 +01:00
coco tracing: Disable branch profiling in noinstr code 2025-03-22 09:49:26 +01:00
configs
crypto This update includes the following changes: 2025-01-24 07:48:10 -08:00
entry x86/entry: Fix kernel-doc warning 2025-02-25 23:12:58 +01:00
events perf/x86/rapl: Add support for Intel Arrow Lake U 2025-02-25 22:48:50 +01:00
hyperv hyperv-next for v6.14 2025-01-25 09:22:55 -08:00
ia32
include KVM/arm64 fixes for 6.14, take #4 2025-03-09 09:04:08 -10:00
kernel tracing: Disable branch profiling in noinstr code 2025-03-22 09:49:26 +01:00
kvm KVM x86 fixes for 6.14-rcN #2 2025-03-09 03:44:06 -04:00
lib CRC updates for 6.14 2025-01-22 19:55:08 -08:00
math-emu
mm tracing: Disable branch profiling in noinstr code 2025-03-22 09:49:26 +01:00
net bpf, x86: Propagate tailcall info only for subprogs 2024-11-12 17:24:03 -08:00
pci pci-v6.14-changes 2025-01-25 16:03:40 -08:00
platform The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
power
purgatory
ras
realmode
tools x86/boot: Reject absolute references in .head.text 2024-12-05 13:18:55 +01:00
um um: properly align signal stack on x86_64 2025-02-12 23:40:42 +01:00
video
virt x86/sev: Fix broken SNP support with KVM module built-in 2025-02-14 18:39:19 -05:00
xen xen: branch for v6.14-rc3 2025-02-14 08:15:17 -08:00
.gitignore
Kbuild tracing: Disable branch profiling in noinstr code 2025-03-22 09:49:26 +01:00
Kconfig x86/microcode/AMD: Load only SHA256-checksummed patches 2025-02-22 11:46:05 +01:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug Documentation: Merge x86-specific boot options doc into kernel-parameters.txt 2024-12-10 18:25:40 +01:00
Makefile
Makefile.postlink kbuild: Strip runtime const RELA sections correctly 2025-02-01 04:28:05 +09:00
Makefile.um
Makefile_32.cpu