Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755208AbbGPP5h (ORCPT ); Thu, 16 Jul 2015 11:57:37 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:35415 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751525AbbGPP5g (ORCPT ); Thu, 16 Jul 2015 11:57:36 -0400 MIME-Version: 1.0 In-Reply-To: References: <1437047167-5634-1-git-send-email-brgerst@gmail.com> <1437047167-5634-2-git-send-email-brgerst@gmail.com> Date: Thu, 16 Jul 2015 11:57:36 -0400 Message-ID: Subject: Re: [PATCH 1/7] x86/vm86: Clean up saved_fs/gs From: Brian Gerst To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , Ingo Molnar , "H. Peter Anvin" , Denys Vlasenko , 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: 864 Lines: 20 On Thu, Jul 16, 2015 at 11:45 AM, Andy Lutomirski wrote: > On Thu, Jul 16, 2015 at 4:46 AM, Brian Gerst wrote: >> There is no need to save FS and non-lazy GS outside the 32-bit regs. Lazy GS >> still needs to be saved because it wasn't saved on syscall entry. > > I think I'm missing something. Why can't you just lazy_save_gs into regs32->gs? > > --Andy That is probably a better idea. The gs field exists in pt_regs but is unused in lazy mode. Could also change switch_to() to store GS in pt_regs instead of thread.gs, which would simplify ptrace a bit. -- 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/