From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752419AbeAERIQ (ORCPT + 1 other); Fri, 5 Jan 2018 12:08:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58400 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbeAERIP (ORCPT ); Fri, 5 Jan 2018 12:08:15 -0500 Date: Fri, 5 Jan 2018 11:08:06 -0600 From: Josh Poimboeuf To: Borislav Petkov Cc: "Woodhouse, David" , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "tim.c.chen@linux.intel.com" , "peterz@infradead.org" , "torvalds@linux-foundation.org" , "ak@linux.intel.com" , "riel@redhat.com" , "keescook@google.com" , "gnomes@lxorguk.ukuu.org.uk" , "pjt@google.com" , "dave.hansen@intel.com" , "luto@amacapital.net" , "jikos@kernel.org" , "gregkh@linux-foundation.org" Subject: Re: [PATCH v3 01/13] x86/retpoline: Add initial retpoline support Message-ID: <20180105170806.mtylu2zagfxyj3ry@treble> References: <1515058213.12987.89.camel@amazon.co.uk> <20180104143710.8961-1-dwmw@amazon.co.uk> <1515160619.29312.126.camel@amazon.co.uk> <1515170506.29312.149.camel@amazon.co.uk> <20180105164505.xpw5pefxsyu3z56e@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180105164505.xpw5pefxsyu3z56e@pd.tnic> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 05 Jan 2018 17:08:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 05, 2018 at 05:45:06PM +0100, Borislav Petkov wrote: > On Fri, Jan 05, 2018 at 04:41:46PM +0000, Woodhouse, David wrote: > > Nope, alternatives are broken. Only a jmp as the *first* opcode of > > altinstr gets handled by recompute_jump(), while any subsequent insn is > > just copied untouched. > > Not broken - simply no one needed it until now. I'm looking into it. > Looks like the insn decoder might come in handy finally. > > :-) I seem to recall that we also discussed the need for this for converting pvops to use alternatives, though the "why" is eluding me at the moment. -- Josh