OrangePi_CM5/tools/testing/selftests
Borislav Petkov 0685efd984 selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage
commit a72fdfd21e01c626273ddcf5ab740d4caef4be54 upstream.

Commit in Fixes changed the iopl emulation to not #GP on CLI and STI
because it would break some insane luserspace tools which would toggle
interrupts.

The corresponding selftest would rely on the fact that executing CLI/STI
would trigger a #GP and thus detect it this way but since that #GP is
not happening anymore, the detection is now wrong too.

Extend the test to actually look at the IF flag and whether executing
those insns had any effect on it. The STI detection needs to have the
fact that interrupts were previously disabled, passed in so do that from
the previous CLI test, i.e., STI test needs to follow a previous CLI one
for it to make sense.

Fixes: b968e84b509d ("x86/iopl: Fake iopl(3) CLI/STI usage")
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20211030083939.13073-1-bp@alien8.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-21 13:46:37 +01:00
..
android
…
arm64 kselftest/arm64: signal: Skip tests if required features are missing 2021-09-30 10:11:03 +02:00
bpf selftests/bpf: Fix also no-alu32 strobemeta selftest 2021-11-18 14:04:32 +01:00
breakpoints
…
capabilities
…
cgroup
…
clone3
…
core selftests/core: fix conflicting types compile error for close_range() 2021-11-18 14:04:01 +01:00
cpu-hotplug
…
cpufreq
…
dmabuf-heaps kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir 2021-03-04 11:38:05 +01:00
drivers selftests: Clean forgotten resources as part of cleanup() 2021-07-19 09:44:49 +02:00
efivarfs
…
exec tools/testing/selftests/exec: fix link error 2021-05-26 12:06:49 +02:00
filesystems
…
firmware selftests: firmware: Fix ignored return val of asprintf() warn 2021-09-18 13:40:20 +02:00
fpu
…
ftrace selftests/ftrace: Fix requirement check of README file 2021-09-18 13:40:07 +02:00
futex
…
gpio selftests/gpio: Fix build when source tree is read only 2021-06-03 09:00:31 +02:00
ia64
…
intel_pstate
…
ipc
…
ir
…
kcmp
…
kexec
…
kmod
…
kselftest tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
kvm KVM: selftests: Fix nested SVM tests when built with clang 2021-11-18 14:04:10 +01:00
lib
…
livepatch
…
lkdtm selftests/lkdtm: Fix expected text for CR4 pinning 2021-07-19 09:45:00 +02:00
locking
…
media_tests
…
membarrier
…
memfd
…
memory-hotplug
…
mincore
…
mount
…
mqueue
…
net selftests/net: udpgso_bench_rx: fix port argument 2021-11-18 14:04:28 +01:00
netfilter selftests: netfilter: remove stray bash debug line 2021-10-27 09:56:54 +02:00
nsfs
…
ntb
…
openat2
…
pid_namespace
…
pidfd
…
powerpc selftests/powerpc: Fix "no_handler" EBB selftest 2021-07-20 16:05:43 +02:00
prctl
…
proc
…
pstore
…
ptp
…
ptrace
…
rcutorture
…
resctrl Revert "selftests/resctrl: Use resctrl/info for feature detection" 2021-08-15 14:00:25 +02:00
rseq
…
rtc
…
safesetid
…
seccomp powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls 2021-05-26 12:06:53 +02:00
sigaltstack
…
size
…
sparc64
…
splice selftests: splice: Adjust for handler fallback removal 2021-07-14 16:56:42 +02:00
static_keys
…
sync
…
sysctl
…
tc-testing tc-testing: fix list handling 2021-07-14 16:56:26 +02:00
timens
…
timers selftests: timers: rtcpie: skip test if default RTC device does not exist 2021-07-20 16:05:42 +02:00
tmpfs
…
tpm2
…
uevent
…
user
…
vDSO
…
vm selftest: fix build error in tools/testing/selftests/vm/userfaultfd.c 2021-08-04 12:46:39 +02:00
watchdog
…
wireguard wireguard: selftests: make sure rp_filter is disabled on vethc 2021-06-10 13:39:24 +02:00
x86 selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage 2021-11-21 13:46:37 +01:00
zram
…
.gitignore
…
Makefile
…
gen_kselftest_tar.sh
…
kselftest.h
…
kselftest_deps.sh
…
kselftest_harness.h
…
kselftest_install.sh
…
kselftest_module.h
…
lib.mk selftests: be sure to make khdr before other targets 2021-10-09 14:40:57 +02:00
run_kselftest.sh
…