From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752929AbbCIRoz (ORCPT ); Mon, 9 Mar 2015 13:44:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:40105 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbbCIRoy (ORCPT ); Mon, 9 Mar 2015 13:44:54 -0400 Message-ID: <54FDDBF7.9080207@zytor.com> Date: Mon, 09 Mar 2015 10:44:23 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Linus Torvalds , Denys Vlasenko CC: Denys Vlasenko , Andy Lutomirski , Steven Rostedt , Ingo Molnar , Borislav Petkov , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: [PATCH] x86: entry_32.S: change ESPFIX test to not touch PT_OLDSS(%esp) References: <1425909943-14687-1-git-send-email-dvlasenk@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/09/2015 09:44 AM, Linus Torvalds wrote: > > And remember: those zero-cost out-of-order branches turn quite > expensive if they *ever* mispredict. Even a 5% mispredict rate is > likely to mean "it's better to have a data dependency chain". > > So it could easily go either way. I'm not convinced the old code is bad at all. > I'm inclined to side with Linus here. I'm hesitant to change this based on pure speculation. To answer Andy's question: I do believe we need espfix for V86 mode as well. -hpa