Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751526AbbGIWmX (ORCPT ); Thu, 9 Jul 2015 18:42:23 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:35501 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbbGIWmP (ORCPT ); Thu, 9 Jul 2015 18:42:15 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Andy Lutomirski Date: Thu, 9 Jul 2015 15:41:54 -0700 Message-ID: Subject: Re: [RFC/PATCH 5/7] x86/vm86: Teach handle_vm86_trap to return to 32bit mode directly To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Rik van Riel , Oleg Nesterov , Denys Vlasenko , Borislav Petkov , Kees Cook , Brian Gerst , Linus Torvalds 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: 1117 Lines: 26 On Wed, Jul 8, 2015 at 12:24 PM, Andy Lutomirski wrote: > The TIF_NOTIFY_RESUME hack it was using was buggy and unsupportable. > vm86 mode was completely broken under ptrace, for example, because > we'd never make it to v8086 mode. > > This code is still a huge, scary mess, but at least it's no longer > tangled with the exit-to-userspace loop. This patch is incorrect. Brian, what's the ETA for your vm86 cleanup? If it's very soon, then I'll see if I can rely on it. If not, I'll have to come up with a way to fix this patch. Grr. The kernel state when handle_vm86_trap is called is absurd right now. Somehow we're supposed to survive do_trap, send a signal corresponding to the outside-vm86 state, and exit vm86 cleanly (with ax = 0), all before returning to user mode. I doubt these semantics are even intentional. This code sucks. --Andy -- 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/