Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4448649imw; Tue, 19 Jul 2022 06:51:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmVRkB7JBooBfYLsSqJZtemflPberiUloN7P2Mmtm9keFEjAt7eAc0hWryNzeZcov7qIXC X-Received: by 2002:aa7:dcc2:0:b0:43a:b180:bb12 with SMTP id w2-20020aa7dcc2000000b0043ab180bb12mr44085655edu.119.1658238696999; Tue, 19 Jul 2022 06:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238696; cv=none; d=google.com; s=arc-20160816; b=CXPpJaCbTqjhZ+nb3lEuODP9eRmo/PWMhnR8H9wPiU3AJVV5BVf1g+7MRyh05NvRCt RKJ9/Mt36iyvsKR5mF6E3cc3nD3waMCNX5voErjOWVEDzAz0z9o4ObgJa99enLuf1+m3 91ayQB7telA05dP3/8h8tRvCVHf4XuUKaE//mRClbFIoXS/8UjfGKb18JDKxz5wB9h4y PdTX0cKJlimiYtFGbDf/rSWWar0HjnENQunpXm4fHIziNHke0TvtNWwEUr5qxO4Q05n6 ruN9qua9/+T6MeLi5bQhaUy/1Edu0g2A81g4QffvZ/PP1mguO7mG+uiBavheaDTBUmLQ QjqQ== 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=fQknKkG2SRsrs647BZqhXoHbas/oXjpnHpvKY969fhs=; b=TU2QRQ/XmehMupEhr4g99BbXVuh1b+deT10AXKEMQTZh1Akpd4/rEYA5vRCJS/sWlg 1B8Ux0uPdeK9gFGBbqSNG1Dj7UaNS+oLfw2B0wN4t5cgMn4/1t80PLnIkeeOkR5dcvGm 2X9QXaRbGE6SHk0t7D0DqW7XEhzzPKfqCuFccktNjZgli+HWCHdVgttpsSzKXV6yLNLX EcCaWgbJK9IbO9g/xARPZVUH4kNNg6RRkGyRM7eJzcgjCw8oq+5jkqGRRo2jzp7ePvPK en5AOa1QD6T+GL7fsOuG2xgBlGnZFFbQbxcbVv6f4cIp8zSX8nFIPGW1pQmJoJ6FNZSa Bmkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQqiY5bZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qp22-20020a170907207600b0072e674c9ecasi17730494ejb.239.2022.07.19.06.51.12; Tue, 19 Jul 2022 06:51:36 -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=@linuxfoundation.org header.s=korg header.b=mQqiY5bZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238605AbiGSMKj (ORCPT + 99 others); Tue, 19 Jul 2022 08:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238469AbiGSMI6 (ORCPT ); Tue, 19 Jul 2022 08:08:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BF3E45F55; Tue, 19 Jul 2022 05:02:05 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 192E3616B7; Tue, 19 Jul 2022 12:02:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F166EC341C6; Tue, 19 Jul 2022 12:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232124; bh=N9y9jrWkFWavSQgIg0Y/ZqemYrSMNISBg/Cd4IgMipM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQqiY5bZjP2JdC2Nqg2hpVuah2kVn+6vxuLcl42X2HFTZ5e1s9/pkh8G+69rgl28e tJ3X9mjUImXKAoa34mR5LZQF2YtNCdQ+Ey7rDBpGq/wJum6FAvCAlHMeqRlMVYXdzA yHk+NpSbNrwiOj5YcmFI7NeQBuIeJlHsixYuzC9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jon Hunter , Ard Biesheuvel , "Russell King (Oracle)" , Sasha Levin Subject: [PATCH 5.4 20/71] ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle Date: Tue, 19 Jul 2022 13:53:43 +0200 Message-Id: <20220719114554.188643571@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114552.477018590@linuxfoundation.org> References: <20220719114552.477018590@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=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: Ard Biesheuvel [ Upstream commit 0609e200246bfd3b7516091c491bec4308349055 ] Jon reports that the Spectre-BHB init code is filling up the kernel log with spurious notifications about which mitigation has been enabled, every time any CPU comes out of a low power state. Given that Spectre-BHB mitigations are system wide, only a single mitigation can be enabled, and we already print an error if two types of CPUs coexist in a single system that require different Spectre-BHB mitigations. This means that the pr_info() that describes the selected mitigation does not need to be emitted for each CPU anyway, and so we can simply emit it only once. In order to clarify the above in the log message, update it to describe that the selected mitigation will be enabled on all CPUs, including ones that are unaffected. If another CPU comes up later that is affected and requires a different mitigation, we report an error as before. Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround") Tested-by: Jon Hunter Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King (Oracle) Signed-off-by: Sasha Levin --- arch/arm/mm/proc-v7-bugs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c index f2c8ff0683fd..b09c54499f95 100644 --- a/arch/arm/mm/proc-v7-bugs.c +++ b/arch/arm/mm/proc-v7-bugs.c @@ -221,10 +221,10 @@ static int spectre_bhb_install_workaround(int method) return SPECTRE_VULNERABLE; spectre_bhb_method = method; - } - pr_info("CPU%u: Spectre BHB: using %s workaround\n", - smp_processor_id(), spectre_bhb_method_name(method)); + pr_info("CPU%u: Spectre BHB: enabling %s workaround for all CPUs\n", + smp_processor_id(), spectre_bhb_method_name(method)); + } return SPECTRE_MITIGATED; } -- 2.35.1