linux-stable/tools
Sean Christopherson fca6d06cd1 KVM: selftests: Hardcode VMCALL/VMMCALL opcodes in "fix hypercall" test
Hardcode the VMCALL/VMMCALL opcodes in dedicated arrays instead of
extracting the opcodes from inline asm, and patch in the "other" opcode
so as to preserve the original opcode, i.e. the opcode that the test
executes in the guest.

Preserving the original opcode (by not patching the source), will make
it easier to implement a check that KVM doesn't modify the opcode (the
test currently only verifies that a #UD occurred).

Use INT3 (0xcc) as the placeholder so that the guest will likely die a
horrible death if the test's patching goes awry.

As a bonus, patching from within the test dedups a decent chunk of code.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220928233652.783504-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-30 06:39:32 -04:00
..
accounting delayacct: remove some unused variables 2022-06-16 19:58:21 -07:00
arch tools kvm headers arm64: Update KVM header from the kernel sources 2022-08-27 11:55:16 -03:00
bootconfig
bpf bpftool: Complete libbfd feature detection 2022-08-10 10:44:01 -03:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-10 10:44:02 -03:00
certs
cgroup tools: add memcg_shrinker.py 2022-07-03 18:08:40 -07:00
counter
debugging tools: Add new "test" taint to kernel-chktaint 2022-09-07 14:51:12 -06:00
edid
firewire
firmware
gpio
hv tools: hv: kvp: remove unnecessary (void*) conversions 2022-09-05 16:55:20 +00:00
iio
include tools/include/uapi: Fix <asm/errno.h> for parisc and xtensa 2022-09-13 14:04:35 +02:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-06-15 08:14:20 -04:00
laptop
leds
lib libperf evlist: Fix per-thread mmaps for multi-threaded targets 2022-09-08 12:17:22 -03:00
memory-model
objtool Misc fixes: 2022-08-28 10:10:23 -07:00
pci
pcmcia
perf perf record: Fix synthesis failure warnings 2022-09-08 15:57:37 -03:00
power platform-drivers-x86 for v6.0-1 2022-08-04 18:19:14 -07:00
rcu
scripts
spi spi: spidev_test: Warn when the mode is not the requested mode 2022-06-13 15:56:03 +01:00
testing KVM: selftests: Hardcode VMCALL/VMMCALL opcodes in "fix hypercall" test 2022-09-30 06:39:32 -04:00
thermal tools/thermal: Fix possible path truncations 2022-08-03 19:28:46 +02:00
time
tracing rtla: Consolidate and show all necessary libraries that failed for building 2022-08-10 12:03:02 -04:00
usb tools: usb: testusb: Add super-plus speed reporting 2022-07-08 14:54:49 +02:00
verification rv/monitor: Add the wwnr monitor 2022-07-30 14:01:30 -04:00
virtio tools/virtio: fix build 2022-08-11 04:26:07 -04:00
vm - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
wmi
Makefile tools/nolibc: make the default target build the headers 2022-06-20 09:43:19 -07:00