Skip to contentSkip to conversation

Patch "x86/vm86/32: Fix POPF emulation" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Mar 19, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    x86/vm86/32: Fix POPF emulation

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     x86-vm86-32-fix-popf-emulation.patch

and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From b5069782453459f6ec1fdeb495d9901a4545fcb5 Mon Sep 17 00:00:00 2001

From: Andy Lutomirski <[email protected]>
Date: Tue, 13 Mar 2018 22:03:12 -0700
Subject: x86/vm86/32: Fix POPF emulation

From: Andy Lutomirski <[email protected]>

commit b5069782453459f6ec1fdeb495d9901a4545fcb5 upstream.

POPF would trap if VIP was set regardless of whether IF was set. Fix it.

Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes 5ed92a8ab71f ("x86/vm86: Use the normal pt_regs area for vm86")
---
 arch/x86/kernel/vm86_32.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/vm86_32.c +2 -1
@@ -727,7 +727,8 @@ void handle_vm86_fault(struct kernel_vm8
 	return;
 
 check_vip:
-	if (VEFLAGS & X86_EFLAGS_VIP) {
+	if ((VEFLAGS & (X86_EFLAGS_VIP | X86_EFLAGS_VIF)) ==
+	    (X86_EFLAGS_VIP | X86_EFLAGS_VIF)) {
 		save_v86_state(regs, VM86_STI);
 		return;
 	}

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/selftests-x86-add-tests-for-the-str-and-sldt-instructions.patch queue-4.14/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool-on-32-bit-kernels.patch queue-4.14/x86-vm86-32-fix-popf-emulation.patch queue-4.14/selftests-x86-add-tests-for-user-mode-instruction-prevention.patch queue-4.14/x86-mm-fix-vmalloc_fault-to-use-pxd_large.patch queue-4.14/selftests-x86-entry_from_vm86-add-test-cases-for-popf.patch queue-4.14/selftests-x86-entry_from_vm86-exit-with-1-if-we-fail.patch