Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1481588rwb; Fri, 19 Aug 2022 04:37:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Q0sfDcE2g3Otm5mZsBT/iIZ9AuLI5egCeIdWUzJH1wXCdG80ht908fATgr+Tk96xCj4y8 X-Received: by 2002:a17:90b:4f47:b0:1f5:6919:8868 with SMTP id pj7-20020a17090b4f4700b001f569198868mr7897745pjb.131.1660909021876; Fri, 19 Aug 2022 04:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660909021; cv=none; d=google.com; s=arc-20160816; b=XrQVYEvszfhnkwUBW6M3GCfAd+qxwfUT6n6FwZn7uGzlZiyE+S0mG4lScPZoFP3lWG P+rbe116+IIlc5htpDg46AErKKrG/Ibsal4fIT3WoXMbVy7ZodHK+uk94gLdV0vcM68G dJkhDI2hB9Uswg9M9NGSUIk7+ghAxZj0416252aVF3r0e+rdsbS4GDoqn9KGnNtc83gK wJ9IfKH8C4bWt3hBNNXdwSTh/aaIw439CqFvCr5nUJiGlDyHLTHUfMgMdBEBJganO0w8 XDurB8ZpL9oWdVdJoHlxBoK1+gYM1cpAwEzZ5PHLIYkdYl7DB/3rXJ79iDJgnGm4we2v YtJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id; bh=JNvvIP+CuP9GNFrGwc5YKddMBhEh0dsImYLySXUovQs=; b=lqxpP7FIZjLXnylKtzLkfXs059+W7dDiJWUBiSoZfA4sA/Yf+z9wIHrfnSp0TpXoQ9 90RF689QLjK6oHEX90kWzkCQxWcBHBhQerXwtYAzlRdKCD2/BVB1gwDBouOe51se4lJR i49YMpWCpDGLNGUbqJIDINgcVhjixK7sGBjvYkebVTvRZ40WX6s8cSOwmZIHtMb10C+D QyvL+iWV1i9g+xSSlkZ78x7C010oNoRKdUFfmoMleESdZow87kEflOYQqKUghBwq5aeN 98XD2kBGDxxwS2hKigvrAnOd35eDrs0WGyGYuBeTZQ/e+TE1s46AMtED5SvhLBe5msF8 wK/w== ARC-Authentication-Results: i=1; mx.google.com; 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 c20-20020a170902b69400b001708ec10860si3294059pls.604.2022.08.19.04.36.50; Fri, 19 Aug 2022 04:37:01 -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; 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 S1348130AbiHSLDA (ORCPT + 99 others); Fri, 19 Aug 2022 07:03:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348495AbiHSLCn (ORCPT ); Fri, 19 Aug 2022 07:02:43 -0400 Received: from maynard.decadent.org.uk (maynard.decadent.org.uk [95.217.213.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1ACFF61A8; Fri, 19 Aug 2022 04:02:42 -0700 (PDT) Received: from 213.219.160.184.adsl.dyn.edpnet.net ([213.219.160.184] helo=deadeye) by maynard with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOzlk-0002zN-5f; Fri, 19 Aug 2022 13:02:28 +0200 Received: from ben by deadeye with local (Exim 4.96) (envelope-from ) id 1oOzli-000aat-1m; Fri, 19 Aug 2022 13:02:26 +0200 Message-ID: <2d899b4a9a08f79396a071eb8c06d524ae6033b0.camel@decadent.org.uk> Subject: Re: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it From: Ben Hutchings To: Peter Zijlstra Cc: x86@kernel.org, linux-kernel@vger.kernel.org, 1017425@bugs.debian.org, =?ISO-8859-1?Q?Martin-=C9ric?= Racine , stable@vger.kernel.org, regressions@lists.linux.dev, Daniel Sneddon , Pawan Gupta Date: Fri, 19 Aug 2022 13:02:17 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-YjhQggnj2zhMxQngHr7f" User-Agent: Evolution 3.44.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 213.219.160.184 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on maynard); SAEximRunCond expanded to false X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --=-YjhQggnj2zhMxQngHr7f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2022-08-19 at 10:47 +0200, Peter Zijlstra wrote: > On Fri, Aug 19, 2022 at 02:33:08AM +0200, Ben Hutchings wrote: > > From: Ben Hutchings > >=20 > > The mitigation for PBRSB includes adding LFENCE instructions to the > > RSB filling sequence. However, RSB filling is done on some older CPUs > > that don't support the LFENCE instruction. > >=20 >=20 > Wait; what? There are chips that enable the RSB mitigations and DONT > have LFENCE ?!? Yes, X86_FEATURE_RSB_CTXSW is enabled if any other Spectre v2 mitigation is enabled. And all Intel family 6 (except some early Atoms) and AMD family 5+ get Spectre v2 mitigation by default. Ben. --=20 Ben Hutchings Beware of bugs in the above code; I have only proved it correct, not tried it. - Donald Knuth --=-YjhQggnj2zhMxQngHr7f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmL/bbkACgkQ57/I7JWG EQmxQg//ZS3fq6QOEM160thdxrPitpXbg0ygRoO4bBjmDY8G/+2sne8MEPRq2r2U gKHbq5O6TTLbGDQjZBwGwMEg1omi8dLHt9m9I8YKBxBwqOHdqO4UrZa9cuvVQnF4 TDTGeBO7sGMRPcuaff7HPKMgjQL2E6+Db2DbZhxvtPkKyRRuoCRONajy7z/W+K0F 9nHY/offfF5EXLySFwqSE1ypm/MTBVro4EGPFKMe/znSx5y4jFh6Dci39BAVb+rf YyzI1y5bmbBnRhy/GGbb/zVhPiQxnwjKCq4o9SUGCh+cWDLfrU8nmkttzxwb2J29 KEK488/fxi7sI4WB7IxPMTI8REqyrxBq8ybWW0i1HBWt+VieHYroqMrsi9kjrgOU 6ae6V5PPi773/WzLK/sYnKlKB74V7svRRsFXgk5p5GKVoIGngaWhNQNAknDpdhPK Sl8sQTsgS8mUnPIKitwtEgNX+XzvKUuSz8ep0tO/a96ZMahoBSbKO2dt2n+jv7e5 FU17Q8IKFnqpb9SybcUhD/BGiTLJ7sWcb+sR20Nlxk2ji0j67gzkKcmtVU+qsgLB 3IzG38XZsd5X+RwTUyO+ZRvTdjKTcj7phIywd+PgYBaWbck1y2OGygJt4U2FDe7a MPMJwbDp3jIE3lt/k+XDWY9x2HvXF5C1ZuOdhSapp+eRW4yVkzs= =QDsX -----END PGP SIGNATURE----- --=-YjhQggnj2zhMxQngHr7f--