Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030293AbbDWQNh (ORCPT ); Thu, 23 Apr 2015 12:13:37 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:38126 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030250AbbDWQNf (ORCPT ); Thu, 23 Apr 2015 12:13:35 -0400 MIME-Version: 1.0 In-Reply-To: References: <1429792491-5978-1-git-send-email-dvlasenk@redhat.com> Date: Thu, 23 Apr 2015 09:13:34 -0700 X-Google-Sender-Auth: 0tZxAGqoP1a3X4Cf1WHXTrK9Nqc Message-ID: Subject: Re: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary From: Linus Torvalds To: Brian Gerst Cc: Denys Vlasenko , Ingo Molnar , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , "the arch/x86 maintainers" , Linux Kernel Mailing List 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: 744 Lines: 17 On Thu, Apr 23, 2015 at 9:06 AM, Brian Gerst wrote: > > So you are saying we should save and conditionally restore the > kernel's %ss during context switch? That shouldn't be too bad. Half > of the time you would be loading the null selector which is fast (no > GDT access, no validation). I'd almost prefer something along those lines, yes. Who knows *what* leaks? If the present bit state leaks, then likely so does the limit value etc etc.. Linus -- 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/