Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp764794pxp; Fri, 11 Mar 2022 14:31:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp1wikmb9zo8JIE7OlDG/yIZ41ylyjpd8/TV4jCCRDiCXnv2DBTvC/tUpKIXnriwfNcz43 X-Received: by 2002:a17:90b:4c42:b0:1bf:c572:cc45 with SMTP id np2-20020a17090b4c4200b001bfc572cc45mr13174737pjb.238.1647037878172; Fri, 11 Mar 2022 14:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647037878; cv=none; d=google.com; s=arc-20160816; b=bX1odBzAmiY37eDposgw3WkWlughBTgWwA2ublSVLwxVxNqQJvospRaikBuxlv3M38 HYka62hW9MMcBGOKxZgILbu7Tc5xXMWVYhlv3OwNqUKHGHvCjRzqzqgWflQHaNNqHkbC Hnz2fD9uVKKgNq4M25q6pbZG7P8AHKdoBZQ/hKzO9FdNs0wzoj7berw/z2NmtIZ9zUMs Wrv04xkCeZd9V3pTFkDjs3G77OdpfRrSRw+TLgiqyE4NAEy3cUMM1ZkSmVR2fgJmyKT+ y3EGJtLkWUYWRE5B1WHH4NQ7lH/RgK1QlJdjqMq+4rbFdzz7fnU5cLQ7bEHi81P156B3 CQbg== 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=tbxcz8/SPkHjd5UWwuSlFqCdBcJ6Mv5c+Z77aGylp2g=; b=L+lvbu0QzQ5mtwB6yoneMy6GSOnpuFdWHxgQnhnEAynM3tb5xQQBrBLogbyEEul+Ou mBAApeWM020b+BiGhPikveEayYdNmpJOuDT9WrFvfk3HewS4Z5hE6gTYFrOwClgn4UJw 9Jgy2JK8vYGvQj9nAdxyOUZT0xFM8z2M9aGNjinVLUgz+OhwTKuU354iwfvCUFzh1sG8 2QRNy3nEF9xxMYr7bH9slcyWpbaBMDzxU43xcrCUuRpzT70JkCFh338oEo/yHy6UM1Mo G3Dk7P9ubeeDUqTCHE8jfozLqDC7JOebrs3cFzWlpeOEhY/PRpXa1wk5Z+/wZzhfTx/Q OiAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y8h9eVCj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 8-20020a630108000000b0038064fda2dcsi8916716pgb.351.2022.03.11.14.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 14:31:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y8h9eVCj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 160311E5216; Fri, 11 Mar 2022 13:36:49 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232246AbiCKIkP (ORCPT + 99 others); Fri, 11 Mar 2022 03:40:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbiCKIkP (ORCPT ); Fri, 11 Mar 2022 03:40:15 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C60F61B98A2; Fri, 11 Mar 2022 00:39:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3D7AA61DF7; Fri, 11 Mar 2022 08:39:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A644C340E9; Fri, 11 Mar 2022 08:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646987951; bh=VR65Ts15rZoinOtKMC5nZR3huGHCng96LOJ+iodA26M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=y8h9eVCjKRRo53CER8Rxrj6wSw5A0E+3gFPJ/3JsFJs7i7WERXFk27+CyA6gu16mP To0aHOvPYC4wiCxsMbHO/WE0oxoilhTUHhQ4zXFDujR5zywHMlaydAq07Ei3CO4c8l XaRgs20lJ3gb9iYLOBGNpa8HDPzsCsJHi3jDBBW0= Date: Fri, 11 Mar 2022 09:39:08 +0100 From: Greg Kroah-Hartman To: Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Catalin Marinas , James Morse Subject: Re: [PATCH 5.16 29/37] arm64: entry: Add vectors that have the bhb mitigation sequences Message-ID: References: <20220309155859.086952723@linuxfoundation.org> <20220309155859.932269331@linuxfoundation.org> <20220310232729.GA16308@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Fri, Mar 11, 2022 at 09:15:32AM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 11, 2022 at 12:27:29AM +0100, Pavel Machek wrote: > > Hi! > > > > > From: James Morse > > > > > > commit ba2689234be92024e5635d30fe744f4853ad97db upstream. > > > > > > Some CPUs affected by Spectre-BHB need a sequence of branches, or a > > > firmware call to be run before any indirect branch. This needs to go > > > in the vectors. No CPU needs both. > > > > > > While this can be patched in, it would run on all CPUs as there is a > > > single set of vectors. If only one part of a big/little combination is > > > affected, the unaffected CPUs have to run the mitigation too. > > > > This adds build error. Same problem is in 5.10. > > > > > --- /dev/null > > > +++ b/arch/arm64/include/asm/vectors.h > > > @@ -0,0 +1,34 @@ > > ... > > > +/* > > > + * Note: the order of this enum corresponds to two arrays in entry.S: > > > + * tramp_vecs and __bp_harden_el1_vectors. By default the canonical > > > + * 'full fat' vectors are used directly. > > > + */ > > > +enum arm64_bp_harden_el1_vectors { > > > +#ifdef CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY > > > + /* > > > + * Perform the BHB loop mitigation, before branching to the canonical > > > + * vectors. > > > + */ > > > + EL1_VECTOR_BHB_LOOP, > > > + > > > + /* > > > + * Make the SMC call for firmware mitigation, before branching to the > > > + * canonical vectors. > > > + */ > > > + EL1_VECTOR_BHB_FW, > > > +#endif /* CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY */ > > > + > > > + /* > > > + * Remap the kernel before branching to the canonical vectors. > > > + */ > > > + EL1_VECTOR_KPTI, > > > ++}; > > > + > > > > > > Note "++". Following patch fixes this up, but it is still a trap for > > people trying to bisect. > > Ick, ok, will try to fix up, thanks for finding this. Now fixed up for 5.16.y, 5.15.y, and 5.10.y, thanks. greg k-h