Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934181AbeAKOcS (ORCPT + 1 other); Thu, 11 Jan 2018 09:32:18 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:53243 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933157AbeAKOcR (ORCPT ); Thu, 11 Jan 2018 09:32:17 -0500 Date: Thu, 11 Jan 2018 15:32:06 +0100 From: Peter Zijlstra To: David Woodhouse Cc: Josh Poimboeuf , Andi Kleen , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , tglx@linutronix.de, Kees Cook , Rik van Riel , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, x86@kernel.org, bp@alien8.de, rga@amazon.de, thomas.lendacky@amd.com Subject: Re: [PATCH v2.1] x86/retpoline: Fill return stack buffer on vmexit Message-ID: <20180111143206.GA6176@hirez.programming.kicks-ass.net> References: <1515670638-8552-1-git-send-email-dwmw@amazon.co.uk> <20180111142038.sqhflhikcailqnwi@treble> <1515680912.22302.351.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1515680912.22302.351.camel@infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 02:28:32PM +0000, David Woodhouse wrote: > On Thu, 2018-01-11 at 08:20 -0600, Josh Poimboeuf wrote: > > > > This seems weird.? I liked v1 a lot better.? What's the problem with > > patching in the whole thing? > > > > Also, if you go back to v1, it should be an easy objtool fix, just add > > ANNOTATE_NOSPEC_ALTERNATIVE in front of it. > > The objection was that I was patching in a fairly long set of > instructions. I confess I don't actually know why that's a problem, You get a giant string of NOPs, a single jmp should be faster.