Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3882722pxb; Wed, 13 Oct 2021 15:15:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzZeaJff0vJ65nvoL4QdVPR3jwHoFTY0u0gxsmDDUadFojSX2gTNtpY9ZEpKdKpwRIL4u3 X-Received: by 2002:a17:906:9414:: with SMTP id q20mr2249048ejx.241.1634163347421; Wed, 13 Oct 2021 15:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634163347; cv=none; d=google.com; s=arc-20160816; b=uJ94Txfv9Ol8tkQ13lhq4hAPIvQaeFQ5lbd9KdAmfDVHpgYtFQhhGWfekkvm1vSqqn iXPfd0Gv6WJnxA7zJ5kxYSv2/4u05W46rS/t1PQowvzoq4sigz1/3J7+xqlv6AAvPK6k imuUWW/2ssrsLLydUDZCENHGzY8VyqXMCuZ3r0SeX/qUn7D9ea26swj50FKTEBDKCshB 4hntkL6Zqg9hAOCTEfW7IPEI7pGny6JJpgWETdlLtwpJ4kVRpoA6t6iql4Y5MruumJId 2BeOhP7s4ilMjWPXVOAiWrN9bfBAFhABBtyd2V4a2oRViq74UtiYUuKCA2Mezf+be8+5 Jk4Q== 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=EWaTJUUpatS09XDZQ1dQh5D8/b7V8Zk8ePbKnUtgH+g=; b=TISuINMZdkGfBy5hTAlyXpzfA79aT3wQxOtmWcjmhM9Wu8XwQ1yT56TEUY0Xvy+vGZ Te3+grsfNBn3bNJc0M5ET2fEi4ppyYBMKdPPEr6/XZk9JbDqZdCfHIdc3dX8b8oJPcp0 A/kAc4QoKgP7ZVQS0V3/sHk4u93KSCFVBSCFo9FFEBIBjHBEBCVMASlIVrPS+lnwokNA O0ujNzDV0YVcOwdtGCSzR3wIsd6Exs4+u3N7nXK0bsGXrlNiB9Tv8CescRgUIkRk5uG7 LPEu4ygBi2bn3gv2WhgxCJfPFQRUoHo5UygIce1Hud8mIzQajkPUWseOo/2xqrCO1PRm Y0gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FLbqjvga; 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 ds12si1599879ejc.655.2021.10.13.15.15.23; Wed, 13 Oct 2021 15:15:47 -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=FLbqjvga; 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 S230437AbhJMWPK (ORCPT + 99 others); Wed, 13 Oct 2021 18:15:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbhJMWPJ (ORCPT ); Wed, 13 Oct 2021 18:15:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76B5C061570 for ; Wed, 13 Oct 2021 15:13:05 -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=EWaTJUUpatS09XDZQ1dQh5D8/b7V8Zk8ePbKnUtgH+g=; b=FLbqjvga786CmsPEv3PlJ00Z6K 582hmG4k0dcADtjzgo447grZZtGfObUOA2ght/328SNwhq1H3GTim51LyQv1HwsBKuGNqUwXTjFch xHGNwjz9FfpJNIK8xfSlb/tFUSCaAU3nC1Rc8phK0BYRYXJvXRUaGCPypyut0oiORUkgJYQbVNJ6A tVEyvtvxF+/4ju8V4Dgk/SAREL4ZM8NdlBkzmMMaxzY9c6kPY8pu7g34hfnSkjSLlH8CQ80ZFjdvQ PqKA3qPdiIt02/nbAsuURF+UDcyzRWMDj0oATLww5AHf5z43g0kMhDrwSTnpqtxtEnJWW6J82dSTj I42h/u0w==; 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 1mamSb-007qEU-Lo; Wed, 13 Oct 2021 22:11:28 +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 3BFAF30030B; Thu, 14 Oct 2021 00:10:53 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1CA36212B3C88; Thu, 14 Oct 2021 00:10:53 +0200 (CEST) Date: Thu, 14 Oct 2021 00:10:53 +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> <20211013203927.zbruy2ux7dug6ljk@treble> <20211013214907.pqr3mr2m4xrh426y@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013214907.pqr3mr2m4xrh426y@treble> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 02:49:07PM -0700, Josh Poimboeuf wrote: > So you've got a WARN_ON_ONCE, a BUG_ON, and a too-deep feature check, > all in the name of supporting this scheme. ok... Mostly because I'm way too lazy to type out that table. With the thunks being in .S, I really don't see that getting messed up, they even in their own special section too. > If performance of the linear lookup were a real concern then you could > just put rax and r11 at the beginning of the array. That would mean the table would have to be { __thunk, reg_idx }, which is even more yuck.