Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp975431pxp; Wed, 16 Mar 2022 23:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyc3N1v9aCVM9Zs+5i4DXcln9zPpDas27MOMQq0uvNhIn3sWbqhMF+K9sfmw1MXUe9ZWpa X-Received: by 2002:a17:90a:5302:b0:1b9:ba0a:27e5 with SMTP id x2-20020a17090a530200b001b9ba0a27e5mr13829414pjh.91.1647497455272; Wed, 16 Mar 2022 23:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647497455; cv=none; d=google.com; s=arc-20160816; b=zV5suzDT7wD/T9KAGkaMDRCiXiNMCPQKhyUhvuXUi9ay8dYXBJqMez0azV4bYp5WRT dbx3Nkym/Aup6gQE9UPo49DkAcdlfWIA3cE5Ksh6i59gI97nXyhVrZ7r5nWJRTzfXMht LTeQikecTsPLayzaBVMTrPLp5S3vjYhk6VAqReqC4KC12mx1YxNFMPrH9mn8bfBJ1zuo aWlWe4a2iBFc4xVWwcgYdJ+HW0NC8xmYebDuBQKXzB40itCLEIdyeHvEFa26ZFU6fra0 u9tkUY4fkPZ9uA6INiNEeTqSut2PbLLF6eLQrgzH+o3m3S3ERZf9UWlOIfycANvlKpYR 49OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lDeXrQVVAeyhqfNs7IpA8m0CEWfAoQIR9z1ka2MZZD8=; b=R3iyUImed+JaR3vPTKBRXPHkCHRR7udXmkM678gk2amO7y+SQA1HqJn8IfMOckzXau 3KeRP+w9A7aLvKCS76GkdmRlMpBRunhFEcIsic6U/+GkPlP/WXQTgHKUs/PElIpVODxl /nkiaxxhT/aYwDrWhGi71JvIY9jck4gsEOrlDNoJVB7q/sdx9cxfZ7rXXgBdFQPlcclC 3wAAKc6oe05Ea6m7HV8INe2OplAcWCJHN/9QkT262uv7+ayPkQgbcH0KZLYuHTHS4btd UMzI7GaLcMhPjiCDvTxvjt6J4hrZ33WLoQ5EaSNqN+pqj4COZLfBTXil/Lvuh47g4XmU Acsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UoUntIXs; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id j5-20020a170903024500b0015383a38c5dsi4523335plh.336.2022.03.16.23.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:10:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UoUntIXs; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 495EF152829; Wed, 16 Mar 2022 21:54:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242127AbiCNM3C (ORCPT + 99 others); Mon, 14 Mar 2022 08:29:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243730AbiCNMVL (ORCPT ); Mon, 14 Mar 2022 08:21:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B67854FBD; Mon, 14 Mar 2022 05:16:48 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id C77AEB80DEB; Mon, 14 Mar 2022 12:16:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BE3EC36AE3; Mon, 14 Mar 2022 12:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647260205; bh=boM+X7Jtz7xEMxABclzXsyS0I01CPMFAo2H06POull4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UoUntIXsC9wtHp58ds+Rtx173QViG3WuIB2S4AiEUC06eXihwsTOO2BfwyrkBz91U 2HM8XrOgD/gscNQFtch3iGLZOtlS5FtCLchGL+ZdUWj/WH/42SQDuXAwB3EftOym1U YAMff8ecqy4LBmrPwfoOby0JpVlIFs+odDX5TSZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , kernel test robot , Russell King , Catalin Marinas , linux-arm-kernel@lists.infradead.org, patches@armlinux.org.uk, Linus Torvalds Subject: [PATCH 5.16 086/121] ARM: Spectre-BHB: provide empty stub for non-config Date: Mon, 14 Mar 2022 12:54:29 +0100 Message-Id: <20220314112746.519389756@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 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 From: Randy Dunlap commit 68453767131a5deec1e8f9ac92a9042f929e585d upstream. When CONFIG_GENERIC_CPU_VULNERABILITIES is not set, references to spectre_v2_update_state() cause a build error, so provide an empty stub for that function when the Kconfig option is not set. Fixes this build error: arm-linux-gnueabi-ld: arch/arm/mm/proc-v7-bugs.o: in function `cpu_v7_bugs_init': proc-v7-bugs.c:(.text+0x52): undefined reference to `spectre_v2_update_state' arm-linux-gnueabi-ld: proc-v7-bugs.c:(.text+0x82): undefined reference to `spectre_v2_update_state' Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Russell King Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Acked-by: Russell King (Oracle) Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- arch/arm/include/asm/spectre.h | 6 ++++++ 1 file changed, 6 insertions(+) --- a/arch/arm/include/asm/spectre.h +++ b/arch/arm/include/asm/spectre.h @@ -25,7 +25,13 @@ enum { SPECTRE_V2_METHOD_LOOP8 = BIT(__SPECTRE_V2_METHOD_LOOP8), }; +#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES void spectre_v2_update_state(unsigned int state, unsigned int methods); +#else +static inline void spectre_v2_update_state(unsigned int state, + unsigned int methods) +{} +#endif int spectre_bhb_update_vectors(unsigned int method);