selftests/x86/entry_from_vm86: Add test cases for POPF
Andy Lutomirski authored
POPF is currently broken -- add tests to catch the error.  This
results in:

   [RUN]	POPF with VIP set and IF clear from vm86 mode
   [INFO]	Exited vm86 mode due to STI
   [FAIL]	Incorrect return reason (started at eip = 0xd, ended at eip = 0xf)

because POPF currently fails to check IF before reporting a pending
interrupt.

This patch also makes the FAIL message a bit more informative.
Reported-by: default avatarBart Oldeman <bartoldeman@gmail.com>
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stas Sergeev <stsp@list.ru>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/a16270b5cfe7832d6d00c479d0f871066cbdb52b.1521003603.git.luto@k...
78393fdd
Name Last commit Last update
..
.gitignore selftests: x86: add missing executables to .gitignore
Makefile Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
check_cc.sh selftests, x86: Rework x86 target architecture detection
check_initial_reg_state.c selftests/x86: Add check_initial_reg_state()
entry_from_vm86.c selftests/x86/entry_from_vm86: Add test cases for POPF
fsgsbase.c selftests/x86/fsgsbase: Test selectors 1, 2, and 3
ioperm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
iopl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
ldt_gdt.c x86/ldt: Make the LDT mapping RO
mpx-debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license
mpx-dig.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
mpx-hw.h x86/mpx/selftests: Fix up weird arrays
mpx-mini-test.c selftests/x86/mpx: Fix incorrect bounds with old _sigfault
mpx-mm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license
pkey-helpers.h x86/pkeys/selftests: Fix protection keys write() warning
protection_keys.c selftests/x86/pkeys: Remove unused functions
ptrace_syscall.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
raw_syscall_helper_32.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license
sigreturn.c selftests/x86/sigreturn: Use CX, not AX, as the scratch register
single_step_syscall.c selftests/x86: Do not rely on "int $0x80" in single_step_syscall.c
syscall_arg_fault.c x86/entry, selftests/x86: Add a test for 32-bit fast syscall arg faults
syscall_nt.c selftests/x86: In syscall_nt, test NT|TF as well
sysret_rip.c selftests/x86: Add a selftest for SYSRET to noncanonical addresses
sysret_ss_attrs.c x86, selftests: Add a test for the "sysret_ss_attrs" bug
test_FCMOV.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
test_FCOMI.c
test_FISTTP.c
test_mremap_vdso.c
test_syscall_vdso.c
test_vdso.c
test_vsyscall.c
thunks.S
thunks_32.S
trivial_32bit_program.c
trivial_64bit_program.c
unwind_vdso.c
vdso_restorer.c