Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030875AbbDWUBm (ORCPT ); Thu, 23 Apr 2015 16:01:42 -0400 Received: from mail-qg0-f52.google.com ([209.85.192.52]:33384 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030657AbbDWUBi (ORCPT ); Thu, 23 Apr 2015 16:01:38 -0400 MIME-Version: 1.0 In-Reply-To: References: <1429792491-5978-1-git-send-email-dvlasenk@redhat.com> From: Denys Vlasenko Date: Thu, 23 Apr 2015 22:01:16 +0200 Message-ID: Subject: Re: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary To: Andy Lutomirski Cc: Linus Torvalds , Brian Gerst , Denys Vlasenko , Ingo Molnar , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , 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: 958 Lines: 23 On Thu, Apr 23, 2015 at 6:27 PM, Andy Lutomirski wrote: > I'll go out on a limb and guess the present bit doesn't leak. If I > were implementing an x86 cpu, I wouldn't have a present bit at all in > the descriptor cache, since you aren't supposed to be able to load a > non-present descriptor in the first place. There is definitely a present bit in cached descriptors. It is used to track whether NULL selector was loaded into this particular segment register. The bit is even visible in SMM save area. See table 10-1 in 24593_APM.pdf Naturally, CS can't be NULL, and up until today I thought SS also can't. But the bit is probably implemented for all eight cached descriptors. -- vda -- 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/