Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752631AbeADSkd (ORCPT + 1 other); Thu, 4 Jan 2018 13:40:33 -0500 Received: from mga07.intel.com ([134.134.136.100]:20817 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbeADSkb (ORCPT ); Thu, 4 Jan 2018 13:40:31 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,315,1511856000"; d="scan'208";a="7908185" Date: Thu, 4 Jan 2018 10:40:23 -0800 From: Andi Kleen To: Alexei Starovoitov Cc: David Woodhouse , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk Subject: Re: [PATCH v3 01/13] x86/retpoline: Add initial retpoline support Message-ID: <20180104184023.GB25714@tassilo.jf.intel.com> References: <1515058213.12987.89.camel@amazon.co.uk> <20180104143710.8961-1-dwmw@amazon.co.uk> <20180104181744.komdplek7nfdvlsw@ast-mbp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180104181744.komdplek7nfdvlsw@ast-mbp> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > Clearly Paul's approach to retpoline without lfence is faster. > I'm guessing it wasn't shared with amazon/intel until now and > this set of patches going to adopt it, right? > > Paul, could you share a link to a set of alternative gcc patches > that do retpoline similar to llvm diff ? I don't think it's a good idea to use any sequence not signed off by CPU designers and extensively tested. While another one may work for most tests, it could always fail in some corner case. Right now we have the more heavy weight one and I would suggest to stay with that one for now. Then worry about more optimizations later. Correctness first. -Andi