linux/tools/testing/selftests
Vitaly Kuznetsov ef40598098 selftests: kvm: fix sync_regs_test with newer gccs
Commit 204c91eff7 ("KVM: selftests: do not blindly clobber registers in
 guest asm") was intended to make test more gcc-proof, however, the result
is exactly the opposite: on newer gccs (e.g. 8.2.1) the test breaks with

==== Test Assertion Failure ====
  x86_64/sync_regs_test.c:168: run->s.regs.regs.rbx == 0xBAD1DEA + 1
  pid=14170 tid=14170 - Invalid argument
     1	0x00000000004015b3: main at sync_regs_test.c:166 (discriminator 6)
     2	0x00007f413fb66412: ?? ??:0
     3	0x000000000040191d: _start at ??:?
  rbx sync regs value incorrect 0x1.

Apparently, compile is still free to play games with registers even
when they have variables attached.

Re-write guest code with 'asm volatile' by embedding ucall there and
making sure rbx is preserved.

Fixes: 204c91eff7 ("KVM: selftests: do not blindly clobber registers in guest asm")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-10-22 13:31:18 +02:00
..
android
arm64 selftests, arm64: add kernel headers path for tags_test 2019-09-17 12:11:50 +01:00
bpf selftests/bpf: More compatible nc options in test_lwt_ip_encap 2019-10-08 23:59:22 +02:00
breakpoints
capabilities
cgroup kselftests: cgroup: add freezer mkdir test 2019-09-12 14:04:40 -07:00
cpu-hotplug
cpufreq
drivers mlxsw: spectrum: Clear VLAN filters during port initialization 2019-09-27 20:33:19 +02:00
efivarfs
exec
filesystems
firmware selftests: firmware: Add request_firmware_into_buf tests 2019-09-04 13:31:28 +02:00
ftrace A few more tracing fixes: 2019-09-30 09:29:53 -07:00
futex
gpio
ia64
intel_pstate
ipc
ir media: selftests: ir: fix ir_loopback test failure 2019-08-14 05:06:25 -03:00
kcmp
kexec sefltest/ima: support appended signatures (modsig) 2019-08-29 12:45:30 -04:00
kmod selftests: kmod: Fix typo in kmod.sh 2019-07-23 10:45:06 -06:00
kselftest selftests/kselftest/runner.sh: Add 45 second timeout per test 2019-10-01 13:33:28 -06:00
kvm selftests: kvm: fix sync_regs_test with newer gccs 2019-10-22 13:31:18 +02:00
lib
livepatch selftests: livepatch: add missing fragments to config 2019-09-23 08:33:16 -06:00
locking
media_tests
membarrier selftests, sched/membarrier: Add multi-threaded test 2019-09-25 17:42:31 +02:00
memfd
memory-hotplug
mount
mqueue
net selftests/net: add nettest to .gitignore 2019-10-04 18:36:34 -07:00
netfilter selftests: netfilter: extend flowtable test script for ipsec 2019-08-05 11:29:50 +02:00
networking/timestamping
nsfs
ntb
pidfd selftests: pidfd: Fix undefined reference to pthread_create() 2019-09-30 22:32:55 +02:00
powerpc selftests/powerpc: Fix compile error on tlbie_test due to newer gcc 2019-10-09 17:16:59 +11:00
prctl
proc
pstore
ptp
ptrace
rcutorture rcutorture: Test TREE03 with the threadirqs kernel boot parameter 2019-08-01 14:30:22 -07:00
rseq
rtc selftests/kselftest/runner.sh: Add 45 second timeout per test 2019-10-01 13:33:28 -06:00
safesetid
seccomp selftests/seccomp: fix build on older kernels 2019-09-23 08:33:16 -06:00
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-02 11:20:17 -07:00
timers
tmpfs
tpm2 selftests/tpm2: Add the missing TEST_FILES assignment 2019-09-25 02:43:48 +03:00
uevent
user
vDSO
vm mm/gup_benchmark: add a missing "w" to getopt string 2019-10-19 06:32:32 -04:00
watchdog selftests: watchdog: Add command line option to show watchdog_info 2019-10-02 13:44:43 -06:00
x86 Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-09-16 19:06:29 -07:00
zram
.gitignore selftests/tpm2: Add log and *.pyc to .gitignore 2019-09-25 02:43:51 +03:00
gen_kselftest_tar.sh
kselftest_harness.h
kselftest_install.sh selftests: Add kselftest-all and kselftest-install targets 2019-10-01 10:11:08 -06:00
kselftest_module.h
kselftest_module.sh
kselftest.h kselftest: save-and-restore errno to allow for %m formatting 2019-07-30 15:46:48 -06:00
lib.mk
Makefile kselftest: exclude failed TARGETS from runlist 2019-10-01 13:28:38 -06:00