linux-stable/tools
Borislav Petkov 93281c4a96 x86/insn: Add an insn_decode() API
Users of the instruction decoder should use this to decode instruction
bytes. For that, have insn*() helpers return an int value to denote
success/failure. When there's an error fetching the next insn byte and
the insn falls short, return -ENODATA to denote that.

While at it, make insn_get_opcode() more stricter as to whether what has
seen so far is a valid insn and if not.

Copy linux/kconfig.h for the tools-version of the decoder so that it can
use IS_ENABLED().

Also, cast the INSN_MODE_KERN dummy define value to (enum insn_mode)
for tools use of the decoder because perf tool builds with -Werror and
errors out with -Werror=sign-compare otherwise.

Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lkml.kernel.org/r/20210304174237.31945-5-bp@alien8.de
2021-03-15 11:05:47 +01:00
..
accounting
arch x86/insn: Add an insn_decode() API 2021-03-15 11:05:47 +01:00
bootconfig tools/bootconfig: Add tracing_on support to helper scripts 2021-01-14 10:32:20 -05:00
bpf Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2021-02-26 13:16:31 -08:00
build perf build: Move feature cleanup under tools/build 2021-03-06 16:54:24 -03:00
cgroup
debugging docs: Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means 2020-12-08 10:53:58 -07:00
edid
firewire
firmware
gpio tools: gpio: remove uAPI v1 code no longer used by selftests 2021-02-15 11:43:28 +01:00
hv
iio
include x86/insn: Add an insn_decode() API 2021-03-15 11:05:47 +01:00
io_uring
kvm/kvm_stat tools/kvm_stat: Exempt time-based counters 2020-12-11 19:18:51 -05:00
laptop
leds
lib Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2021-03-09 17:15:56 -08:00
memory-model tools/memory-model: Fix typo in klitmus7 compatibility table 2021-01-04 14:40:50 -08:00
objtool x86/insn: Add a __ignore_sync_check__ marker 2021-03-15 11:00:57 +01:00
pci
pcmcia
perf x86/insn: Add a __ignore_sync_check__ marker 2021-03-15 11:00:57 +01:00
power platform-drivers-x86 for v5.12-1 2021-02-22 08:50:01 -08:00
scripts New features: 2021-02-22 13:59:43 -08:00
spi
testing arm64 fixes for -rc3 2021-03-12 11:39:53 -08:00
thermal/tmon
time
tracing tracing/tools: fix a couple of spelling mistakes 2021-02-25 12:54:16 -05:00
usb
virtio tools/virtio: add barrier for aarch64 2020-12-18 16:14:30 -05:00
vm
wmi
Makefile tracing/tools: Add the latency-collector to tools directory 2021-02-12 11:52:59 -05:00