Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2493445rdg; Mon, 14 Aug 2023 04:35:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuct8l3QMbnIH1WE/vyTxBNzSiGg7F7Ce6ulfnARiR1qPhz4mkZMADrEyCZ86Bg8YD8eJE X-Received: by 2002:a17:906:844e:b0:993:f12a:39ce with SMTP id e14-20020a170906844e00b00993f12a39cemr7385190ejy.15.1692012928909; Mon, 14 Aug 2023 04:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692012928; cv=none; d=google.com; s=arc-20160816; b=UfytSxMoZsDOaWCLf7e/1fARzDFh+riIo7/ZUAXozsrTIz/Rz0UK6pBHDlvgnlOFqd I5TLjBelwEpfKgCsG42lZEokqFUZcmr+eSdYQVFWH21XxZmPwCnfnXKmYOUgAQa8Cjjc DIMfqRZcOW/y0ZuNQ4qKGCZD9ks10vfJFixV1moKfdOON6Uemy48mvQ4gIaCwfU2Xfui dZlvGxsSyaFNU1pCg1p7euSiC3rYEeBqE0ryrgqPETi0gLK4C46A7zxeNj8Kd5T3SgKB Jf51JqOcOI+MaP74jvhi92SC8NZEOVjK5/zb5sqSPKYp0Mo+miMPrZ9fOPpjT/J+33Nc E0Ng== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=n/5fur1O7HmezLAB1D08kXCllPEF6sWoE3meSxj3Rn4=; fh=q1rMKtT0TvfYK8yUnr0+BAEMMC41cpNrlcKMm0ARVCE=; b=ShhELRXDQXuJs+bsaJwFaCooqbKy17JiUjK+2+i4FdkczPooQ/Qinw5Xu1Dm21OwVx T/9c3kv4uvqe5oztRW8C5RxkgkFYv/DyIhCklx07sUr/3n1/xq4ZENVSaW50HtpJRaZu oxg1wPNltWuel6KYfYwZScd7deejM7pUph/uz8av0GznangaVliENXfkw89wUP9MJtpG SdkEq3q+79wlDCGqgMasAMVoj0S0OAdt7r32U/2vrk0vKxk3OY+rdWxdYLz5gM35p7nS PNmaRJkOFVZe8gB9HjYPL4TaurpA0eoAW29tUR7WEirj5eN8M2d1a9NFymQPYaTTGnT7 AWpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bklOlH07; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020a170906549000b00993b02dd96dsi7697457ejo.372.2023.08.14.04.35.03; Mon, 14 Aug 2023 04:35:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bklOlH07; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233921AbjHNKfV (ORCPT + 99 others); Mon, 14 Aug 2023 06:35:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232710AbjHNKev (ORCPT ); Mon, 14 Aug 2023 06:34:51 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824EBFB for ; Mon, 14 Aug 2023 03:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=n/5fur1O7HmezLAB1D08kXCllPEF6sWoE3meSxj3Rn4=; b=bklOlH07ynK64pEaHS88zLq1IS i/qiUuqn+txNvZDv5Qef9vDhw6UQ/rfkNEO5cRGGEFCZ8LOiEh6NfXX22H4XE1Uspiie8XzHTlBHd vyQoJZdxEa1sVjvgYkCuVsg3o4Oq+JxDY4szfDU8HhQH8bSp7m7fZ3qm8LVQYbdcA/KUacB8B4qnI nGU1z7fGaYRxtyHT0hyKVCKBMo9Vkq6HXASb3h9B79lOvf4zd4HIa+Di9tmYYTPy3dUwEopfZjUuu NBKFd9yQcD0yjGF76a6PQ98OaVDYwINu0UcDahLdYAhgEnNhrkZdPEIYFNyAaMMEkiiiaIuNLfRlU TiCCQ8SA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qVUuE-00AW74-07; Mon, 14 Aug 2023 10:34:38 +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 (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8A17A30020B; Mon, 14 Aug 2023 12:34:37 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6B96A20C1700F; Mon, 14 Aug 2023 12:34:37 +0200 (CEST) Date: Mon, 14 Aug 2023 12:34:37 +0200 From: Peter Zijlstra To: Andrew.Cooper3@citrix.com Cc: Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org, David.Kaplan@amd.com, gregkh@linuxfoundation.org Subject: Re: [RFC][PATCH 12/17] x86/cpu: Rename original retbleed return thunk Message-ID: <20230814103437.GC776869@hirez.programming.kicks-ass.net> References: <20230809071218.000335006@infradead.org> <20230809072201.259675763@infradead.org> <20230809142031.jkj4pa2mhccrdmmd@treble> <20230809142255.GQ212435@hirez.programming.kicks-ass.net> <20230810130229.GA212435@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 13, 2023 at 04:23:27PM +0100, Andrew.Cooper3@citrix.com wrote: > On 10/08/2023 2:02 pm, Peter Zijlstra wrote: > > So BTC as a whole is the fact that AMD predicts the type of an > > instruction and then picks a predictor to predict the target of that > > instruction, no? > > No. > > "Branch Type Confusion" is the technical name AMD gave last year's > issue.? Hence the name of the whitepaper about it, > https://www.amd.com/system/files/documents/technical-guidance-for-mitigating-branch-type-confusion.pdf Bah, then what do we call the actual underlying issue that the AMD branch predictor starts by predicting the next instruction type -- before it has been decoded -- meaning it can predict it wrong, which then leads to a tons of other issues, including but not limited to: SLS through JMP (or pretty much anything else) RET from BTB ? Calling *THAT* branch-type-confusion makes a heap more sense to me.