linux-stable/tools
Peter Zijlstra ea24213d80 objtool: Add UACCESS validation
It is important that UACCESS regions are as small as possible;
furthermore the UACCESS state is not scheduled, so doing anything that
might directly call into the scheduler will cause random code to be
ran with UACCESS enabled.

Teach objtool too track UACCESS state and warn about any CALL made
while UACCESS is enabled. This very much includes the __fentry__()
and __preempt_schedule() calls.

Note that exceptions _do_ save/restore the UACCESS state, and therefore
they can drive preemption. This also means that all exception handlers
must have an otherwise redundant UACCESS disable instruction;
therefore ignore this warning for !STT_FUNC code (exception handlers
are not normal functions).

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-04-03 11:02:24 +02:00
..
accounting
arch tools headers uapi: Sync powerpc's asm/kvm.h copy with the kernel sources 2019-03-28 14:41:21 -03:00
bpf bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump() 2019-03-19 16:52:06 -03:00
build perf cs-etm: Add missing case value 2019-03-28 14:31:55 -03:00
cgroup
crypto
debugging tools: add a kernel-chktaint to tools/debugging 2019-01-08 16:29:52 -07:00
firewire
firmware tools/firmware/ihex2fw: Replace explicit alignment with ALIGN 2019-01-22 10:23:18 +01:00
gpio tools gpio: Allow overriding CFLAGS 2018-12-28 16:33:08 -03:00
hv
iio Merge 5.0-rc6 into staging-next 2019-02-11 09:25:01 +01:00
include tools headers: Update x86's syscall_64.tbl and uapi/asm-generic/unistd 2019-03-28 14:41:11 -03:00
io_uring io_uring: add a few test tools 2019-03-06 13:00:16 -07:00
kvm/kvm_stat
laptop
leds
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-27 12:22:57 -07:00
memory-model tools/memory-model: Make scripts take "-j" abbreviation for "--jobs" 2019-01-21 11:07:04 +01:00
nfsd
objtool objtool: Add UACCESS validation 2019-04-03 11:02:24 +02:00
pci
pcmcia
perf perf pmu: Fix parser error for uncore event alias 2019-03-28 15:53:27 -03:00
power tools/power turbostat: return the exit status of a command 2019-03-19 16:51:16 +01:00
scripts
spi
testing A collection of x86 and ARM bugfixes, and some improvements to documentation. 2019-03-31 08:55:59 -07:00
thermal/tmon tools thermal tmon: Use -O3 instead of -O1 if available 2019-01-04 12:54:49 -03:00
time
usb
virtio virtio: fix test build after uio.h change 2018-12-19 18:23:49 -05:00
vm tools/vm/slabinfo: clean up usage menu debug items 2019-03-05 21:07:20 -08:00
wmi
Makefile Merge branch 'thorsten' into docs-next 2019-01-08 16:38:36 -07:00