linux-stable/tools/testing
Borislav Petkov 0685efd984 selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage
commit a72fdfd21e 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: b968e84b50 ("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
..
fault-injection
ktest tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
kunit tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
nvdimm device-dax: add dis-contiguous resource support 2020-10-13 18:38:28 -07:00
radix-tree idr test suite: Create anchor before launching throbber 2021-04-16 11:43:21 +02:00
scatterlist tools/testing/scatterlist: Fix test to compile and run 2020-11-17 20:02:20 -04:00
selftests selftests/x86/iopl: Adjust to the faked iopl CLI/STI usage 2021-11-21 13:46:37 +01:00
vsock