]> git.baikalelectronics.ru Git - kernel.git/commit
jump_label,noinstr: Avoid instrumentation for JUMP_LABEL=n builds
authorPeter Zijlstra <peterz@infradead.org>
Mon, 2 May 2022 10:30:20 +0000 (12:30 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 27 May 2022 10:34:44 +0000 (12:34 +0200)
commit9b224e51384036bb74fe4d75fbaaa4489a30cfce
tree05427309d095605fecaed83ec7ae59e71eff1752
parentbf8401b33f4dee20f38fd3376ccd7a8e144ad2f4
jump_label,noinstr: Avoid instrumentation for JUMP_LABEL=n builds

When building x86_64 with JUMP_LABEL=n it's possible for
instrumentation to sneak into noinstr:

vmlinux.o: warning: objtool: exit_to_user_mode+0x14: call to static_key_count.constprop.0() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_exit_to_user_mode+0x2d: call to static_key_count.constprop.0() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_exit_to_user_mode+0x1b: call to static_key_count.constprop.0() leaves .noinstr.text section

Switch to arch_ prefixed atomic to avoid the explicit instrumentation.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
include/linux/jump_label.h