linux/include
Thomas Gleixner 0372007f5a context_tracking: Ensure that the critical path cannot be instrumented
context tracking lacks a few protection mechanisms against instrumentation:

 - While the core functions are marked NOKPROBE they lack protection
   against function tracing which is required as the function entry/exit
   points can be utilized by BPF.

 - static functions invoked from the protected functions need to be marked
   as well as they can be instrumented otherwise.

 - using plain inline allows the compiler to emit traceable and probable
   functions.

Fix this by marking the functions noinstr and converting the plain inlines
to __always_inline.

The NOKPROBE_SYMBOL() annotations are removed as the .noinstr.text section
is already excluded from being probed.

Cures the following objtool warnings:

 vmlinux.o: warning: objtool: enter_from_user_mode()+0x34: call to __context_tracking_exit() leaves .noinstr.text section
 vmlinux.o: warning: objtool: prepare_exit_to_usermode()+0x29: call to __context_tracking_enter() leaves .noinstr.text section
 vmlinux.o: warning: objtool: syscall_return_slowpath()+0x29: call to __context_tracking_enter() leaves .noinstr.text section
 vmlinux.o: warning: objtool: do_syscall_64()+0x7f: call to __context_tracking_enter() leaves .noinstr.text section
 vmlinux.o: warning: objtool: do_int80_syscall_32()+0x3d: call to __context_tracking_enter() leaves .noinstr.text section
 vmlinux.o: warning: objtool: do_fast_syscall_32()+0x9c: call to __context_tracking_enter() leaves .noinstr.text section

and generates new ones...

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200505134340.811520478@linutronix.de
2020-06-11 15:14:36 +02:00
..
acpi Merge branch 'acpica' 2020-06-10 17:27:28 +02:00
asm-generic Merge branch 'rwonce/rework' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux 2020-06-10 14:46:54 -07:00
clocksource
crypto
drm drm: remove drm specific kmap_atomic code 2020-06-04 19:06:22 -07:00
dt-bindings This time around we have 4 lines of diff in the core framework, removing a 2020-06-10 11:42:19 -07:00
keys keys: Implement update for the big_key type 2020-06-02 17:22:31 +01:00
kunit
kvm
linux context_tracking: Ensure that the critical path cannot be instrumented 2020-06-11 15:14:36 +02:00
math-emu
media media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
misc
net Merge branch 'work.sysctl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-06-10 16:05:54 -07:00
pcmcia
ras
rdma dynamic_debug: add an option to enable dynamic debug for modules only 2020-06-08 11:05:56 -07:00
scsi SCSI misc on 20200605 2020-06-05 15:11:50 -07:00
soc pci-v5.8-changes 2020-06-06 11:01:58 -07:00
sound ASoC: Updates for v5.8 2020-06-01 20:26:07 +02:00
target
trace f2fs-for-5.8-rc1 2020-06-09 11:28:59 -07:00
uapi virtio: features, fixes 2020-06-10 13:42:09 -07:00
vdso
video
xen mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00