Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3865168pxb; Wed, 13 Oct 2021 14:50:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7Ck/xyTVWzcTHVb8Cc0eksG5LQWhoNAujoeAgQZjN2VT2+/MQQVD3skapZw3o3pQjoTO0 X-Received: by 2002:a65:530d:: with SMTP id m13mr1368432pgq.128.1634161817113; Wed, 13 Oct 2021 14:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634161817; cv=none; d=google.com; s=arc-20160816; b=BfUYzfbgvP+IaIORPMIvdMskcpSobF+gHTILghP0/1FAlCy5ICKcde2cm+XYFCj34R Oycm5Mhj3TSnRuJSPoBM8ho/96NstEmrbR/HuQRP4LMiY5BPqP4M4gVQutacechtDJck RtFxpePmX9JiduSmdq2Yt9DtUGuXC5l5dmqBHOE9MQkMB1UcyAhgdiTYWVDlM7HdHTEr bqRtGWmwCHAU4khJMoVlOgzoNyXyVrkRkWOcJmZFaZw1260jfuYKEytuYuL6tfVKZoSj xdzDt/GSLSTH6ZNPNbRU0BE4YbAIVPeK9jh+XgVMdpzeyE5xktruX7//gv/f/ro1Y66W 85bg== 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=HZ56KTHPdvuvUfo/m6ab1r7tDy+YZjwbbIrWO42qRg8=; b=ZEs6cLVgsZHc9opCj7DFYQa5OMYh81g4y/XOmLRxUFM8Vp2SUVrbJKZV5t9qXsx2Ok DiZerpGj0gf9AMg011ePIxBwoTOfFrajl0sU//tWvUhgryw1fCE+kpaP0VWhR7VqAHGq iulKR18uhRAC/+7/tKsYxGnAYoy3J7ukaC38Lnudw9XCj+n2OsMbd9Gu2aHSdgYdZoGK VS+9XkbpKhoSQmaPyUl36alYZ0tc9IIk7z6rYZviHy+JSjWjm/MsmrMbOU5KmxncKz06 rJoZ/mf+TQdnsXN+3qxNxObnIOMjSoLS0NVYI0y3QeATIZzK9cYydVO2Dorj+gzhtNaV Buqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Tt5MSBeG; 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 m10si1036715pls.190.2021.10.13.14.50.03; Wed, 13 Oct 2021 14:50:17 -0700 (PDT) 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=casper.20170209 header.b=Tt5MSBeG; 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 S230201AbhJMVuI (ORCPT + 99 others); Wed, 13 Oct 2021 17:50:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbhJMVuH (ORCPT ); Wed, 13 Oct 2021 17:50:07 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62FF1C061570 for ; Wed, 13 Oct 2021 14:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=HZ56KTHPdvuvUfo/m6ab1r7tDy+YZjwbbIrWO42qRg8=; b=Tt5MSBeGQSYsqjHikpMA7ypEXw a+2fYM7CcZMHQ+mV02ptnXLWWGrl/by2EqAzIqvUkc17MnorSklObsMTfE8CHiamk3w/6kaJqNFj9 Cn+yyCMuV340ce88gXIoZrgwW7hL4vvBkKn/TLgcij5nGpLAxsAG54Ah59M4SiaivtVPwSHsVeHYZ 8bOitIanF5x9vYUWoDqhRtXWTC4sJwNexzi/pXDpc1oySC3bZdN7/m1aguAI1Yz+BNKgonly3oUyp zp7XKGtHIALao/sHQpOa6GzJzA0J4t4lIMyhKrHNTFK1cm3QcI4Gq9YD8IgTjqjVIxYQhahmb92Wt dNv9FYLw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mam2I-007p69-VS; Wed, 13 Oct 2021 21:44:06 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3695D300252; Wed, 13 Oct 2021 23:43:43 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2077320193AF3; Wed, 13 Oct 2021 23:43:43 +0200 (CEST) Date: Wed, 13 Oct 2021 23:43:43 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: x86@kernel.org, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, alexei.starovoitov@gmail.com, ndesaulniers@google.com Subject: Re: [PATCH 4/9] x86/alternative: Implement .retpoline_sites support Message-ID: References: <20211013122217.304265366@infradead.org> <20211013123645.002402102@infradead.org> <20211013211118.apsj66c6b6abubeo@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013211118.apsj66c6b6abubeo@treble> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 02:11:18PM -0700, Josh Poimboeuf wrote: > On Wed, Oct 13, 2021 at 02:22:21PM +0200, Peter Zijlstra wrote: > > +#ifdef CONFIG_X86_64 > > + > > +/* > > + * CALL/JMP *%\reg > > + */ > > +static int emit_indirect(int op, int reg, u8 *bytes) > > X86_64 is already equivalent to STACK_VALIDATION these days, but might > as well clarify here where the retpoline_sites dependency comes from by > changing this to '#ifdef CONFIG_STACK_VALIDATION'. Yeah, I was contemplating having x86_64 unconditionally select that. Maybe we should. Also, I think I've proposed it before, but what about: s/STACK_VALIDATION/OBJTOOL/ on all that?