Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031257AbbDWVLb (ORCPT ); Thu, 23 Apr 2015 17:11:31 -0400 Received: from mail.skyhub.de ([78.46.96.112]:34176 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758458AbbDWVK0 (ORCPT ); Thu, 23 Apr 2015 17:10:26 -0400 Date: Thu, 23 Apr 2015 23:10:15 +0200 From: Borislav Petkov To: Denys Vlasenko Cc: Andy Lutomirski , Linus Torvalds , Brian Gerst , Denys Vlasenko , Ingo Molnar , Steven Rostedt , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary Message-ID: <20150423211015.GS28327@pd.tnic> References: <1429792491-5978-1-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 870 Lines: 24 On Thu, Apr 23, 2015 at 10:01:16PM +0200, Denys Vlasenko wrote: > 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. There's this section about NULL selector in APM v2. It says that NULL selectors are used to invalidate segment registers and software can load a NULL selector in SS in CPL0. So, if an interrupt happens and as you quoted earlier that SS gets set to NULL as a result of an interrupt, there's that SS leak causing the SS exception. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/