Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753512AbeADQhe (ORCPT + 1 other); Thu, 4 Jan 2018 11:37:34 -0500 Received: from mga04.intel.com ([192.55.52.120]:44053 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbeADQhd (ORCPT ); Thu, 4 Jan 2018 11:37:33 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,314,1511856000"; d="scan'208";a="189679075" Date: Thu, 4 Jan 2018 08:37:02 -0800 From: Andi Kleen To: Juergen Gross 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 10/13] x86/retpoline/pvops: Convert assembler indirect jumps Message-ID: <20180104163702.GM25156@tassilo.jf.intel.com> References: <20180104143710.8961-1-dwmw@amazon.co.uk> <20180104143710.8961-10-dwmw@amazon.co.uk> <380dc816-1732-90dc-268e-4a8c3e7ccc7d@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <380dc816-1732-90dc-268e-4a8c3e7ccc7d@suse.com> 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: On Thu, Jan 04, 2018 at 04:02:06PM +0100, Juergen Gross wrote: > On 04/01/18 15:37, David Woodhouse wrote: > > Convert pvops invocations to use non-speculative call sequences, when > > CONFIG_RETPOLINE is enabled. > > > > There is scope for future optimisation here — once the pvops methods are > > actually set, we could just turn the damn things into *direct* jumps. > > But this is perfectly sufficient for now, without that added complexity. > > I don't see the need to modify the pvops calls. > > All indirect calls are replaced by either direct calls or other code > long before any user code is active. > > For modules the replacements are in place before the module is being > used. Agreed. This shouldn't be needed. -Andi