Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752294AbbG2Rgz (ORCPT ); Wed, 29 Jul 2015 13:36:55 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]:35279 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbbG2Rgx (ORCPT ); Wed, 29 Jul 2015 13:36:53 -0400 MIME-Version: 1.0 In-Reply-To: References: <1438148483-11932-1-git-send-email-brgerst@gmail.com> <1438148483-11932-5-git-send-email-brgerst@gmail.com> Date: Wed, 29 Jul 2015 13:36:52 -0400 Message-ID: Subject: Re: [PATCH 4/8] x86/vm86: Use the normal pt_regs area for vm86 From: Brian Gerst To: Linus Torvalds Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Ingo Molnar , "H. Peter Anvin" , Denys Vlasenko Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1250 Lines: 31 On Wed, Jul 29, 2015 at 1:16 PM, Linus Torvalds wrote: > On Wed, Jul 29, 2015 at 10:14 AM, Brian Gerst wrote: >> >> I think it was causing signal handling to fail, but I can't remember >> exactly. > > Ugh. > > If that hunk made a difference, then there is something wrong with > your patch-series. So please double-check. > > Linus I think I remember now what the issue was. Since entering vm86 mode uses force_iret(), the work_pending code path was being taken. I had to move the call to save_v86_state out of here to handle_signal(), otherwise it would just restore the 32-bit regs and exit the syscall without ever entering vm86 mode. But that meant that the test for kernel CS was seeing the vm86 regs instead of 32-bit regs, and was failing because it didn't account for the VM bit (if the real-mode CS looked like RPL 0). A fault would get stuck in a loop because it couldn't exit to the signal handling code. -- Brian Gerst -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/