From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752914AbaI3W1y (ORCPT ); Tue, 30 Sep 2014 18:27:54 -0400 Received: from www.linutronix.de ([62.245.132.108]:33853 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbaI3W1w (ORCPT ); Tue, 30 Sep 2014 18:27:52 -0400 Date: Wed, 1 Oct 2014 00:27:41 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: Sebastian Lackner , X86 ML , Ingo Molnar , "H. Peter Anvin" , Anish Bhatt , "linux-kernel@vger.kernel.org" , Chuck Ebbert , stable@kernel.org Subject: Re: [PATCH 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace In-Reply-To: Message-ID: References: <542B2305.9060805@fds-team.de> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Sep 2014, Andy Lutomirski wrote: > It would certainly be possible to clear NT and retry IRET if IRET > fails with NT set. This would have no overhead for anything relevant. > That would be this alternative from my 0/2 email: > > - Don't filter NT on sysenter. Instead, filter it on EFI entry > and modify the IRET code to retry without NT set if NT was set. > > Thomas hpa, etc: any thoughts? Filter it right away. That's solid and obvious. Anything else is just complex and prone for future brown paperbag failures. We get the context switch benefit from it, so there is some compensation for the extra cycles. Thanks, tglx