Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp444316pxb; Sat, 20 Feb 2021 08:52:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJydkDvkk7yuvmlRjmtzfdyCaUE8UWTAk1wEq/w/A5SiJ8OxlJS0iD39MTJizP69g6pTj08g X-Received: by 2002:a50:fa89:: with SMTP id w9mr14413677edr.22.1613839941934; Sat, 20 Feb 2021 08:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613839941; cv=none; d=google.com; s=arc-20160816; b=wEa18T9Kss3CCjuak8gdzdk/UMmU+zAY6piuTZcjXlup0LeEkmWNIprDnE5DvbK6Id 3vOBgvzDQeX5rMty4fTacdTRAkCvrz57AVGrQAF1T+gWRflUniapDei4zmK1i5i5vbIs 6KLh4syYTemOlMvlx+sWjVZd4lr7Kq1OzNm/e0l83mcJfccaMYA2Rq4qdfMJR8kMTM1Q bfvA+cPdkIehSkAd0veBU8Ml9fHSrm5UWh/OeeO9K8gUPOw7XE2JtUPGHXduXOCf3um5 xPofoabUbgcWU6Oml1dxKGKrAinfVBdKjTEYcIwYNXch9br43J/Yr/PGbkDMdn++W3tQ szjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=46TCTgnZodiU01OXPfDGErt7ZNsroSjj4AQbXDSDo1E=; b=bbOhaOdRuHhuwVOCFIqM9mmI5JiUQfxEeCgsWOmK6NnVq+OUVgQSMU2Kn34ZLsGBST EqnPRja3PolNfDInuMljl8WNAz9ZsS3FtYUcizPmc6u/QVZAwsD4fJfs0PIxdsmHuBW9 Zo/uhGTBXncUT+beXNN9mEYHO6hW/QnEgM2ysPbuCKgqGBa4Rhr+EE+j+UQQBzWXwRII e9JtWp7x43Gzn3uqiGFlitzm7Kk49Nziox5T2AEAwmTgSrOderStiA26Ej5qe9xeONIE pmNT+y2MrUZbyArvc+x4TGnFmseerNLpRtvbgh2F50FCYeIBTbdtZkKpXIjG8157kvvr 7RUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=MXaFW5FG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si10037685edi.63.2021.02.20.08.51.58; Sat, 20 Feb 2021 08:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=MXaFW5FG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229868AbhBTQtk (ORCPT + 99 others); Sat, 20 Feb 2021 11:49:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbhBTQtj (ORCPT ); Sat, 20 Feb 2021 11:49:39 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6599C061574 for ; Sat, 20 Feb 2021 08:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=46TCTgnZodiU01OXPfDGErt7ZNsroSjj4AQbXDSDo1E=; b=MXaFW5FGWF1P7ZebLeeNz7/SFM cRtlJXrjGvi+zO2ZHvw/+DPg4JbZjTu120D4PqPPqeErPHsiAUz2oFMuZYboCEe0SpJDiP05twOt2 cOn/+kGpLNapMrI1aa3QvYX9vWq40aSwt+itVmxC35gjC3un1HB79P9IEmYuu1tJlX30w0djsFeJA TLFAO98q77HgBKbNGQ55eeM97EZqn6hHkES27VlIoxfWphTOQbPuPacaww1LsmyP05s8KGoiAB5+p oIoicnVuPFLFrEQASUlKfr/PhHFw8kqxcFK6mKBKotY3W/xv9OgH2Dx7iMUZgqMb2oaLjIyE5R0Hp 9yeca7+g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDVR3-0003Qx-BQ; Sat, 20 Feb 2021 16:48:49 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id AE8E9300DB4; Sat, 20 Feb 2021 17:48:46 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8FB782021555E; Sat, 20 Feb 2021 17:48:46 +0100 (CET) Date: Sat, 20 Feb 2021 17:48:46 +0100 From: Peter Zijlstra To: Borislav Petkov Cc: Josh Poimboeuf , x86@kernel.org, pjt@google.com, mbenes@suze.cz, jgross@suse.com, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 6/6] objtool,x86: Rewrite retpoline thunk calls Message-ID: References: <20210219204300.749932493@infradead.org> <20210219210535.492733466@infradead.org> <20210219215530.ivzzv3oavhuip6un@treble> <20210219220158.GD59023@worktop.programming.kicks-ass.net> <20210220003920.GG26778@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210220003920.GG26778@zn.tnic> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 20, 2021 at 01:39:20AM +0100, Borislav Petkov wrote: > On Fri, Feb 19, 2021 at 11:01:58PM +0100, Peter Zijlstra wrote: > > We could, but it so happens Joerg is also wanting negative features. > > Juergen. Argh! I should stick to jgross. Sorry. > > So I was thikning that perhaps we can convince Boris they're not > > really all that aweful after all :-) > > Well, I'm not crazy about this, TBH - I totally agree with Josh: > > "with objtool generating code, it's going to be a maze to figure out > where the generated code is coming from" > > and without a real good reason to do this, what's the point? I know, > because we can. :-) Well: - straight line execution is always better than a round-trip to somewhere else, no matter how trivial. - supposely EIBRS (yeah, I know, there's a paper out there) should result in no longer using retpolines. - I really, as in _REALLY_ don't want to do a CET enabled retpoline - IOW, retpolines should be on their way out (knock on wood) - doing this was fun :-) - this stuff was mostly trivial make work stuff I could do with a head full of snot and a headache. - if we had negative alternatives objtool doesn't need to actually rewrite code in this case. It could simply emit alternative entries and call it a day. - objtool already rewrites code - I have more cases for objtool to rewrite code (I'll see if I can rebase and post that this weekend -- no promises). - also https://lkml.kernel.org/r/20200625200235.GQ4781@hirez.programming.kicks-ass.net