Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4447494imw; Tue, 19 Jul 2022 06:50:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v5tEgZ9N/KAHopvLM9B4I8ckuA6zKCbWyd1TxmVHjuEkE+nzK9VgQVKdYPSKKOUBwLLHh6 X-Received: by 2002:a17:906:9b0a:b0:72b:4fc2:4b07 with SMTP id eo10-20020a1709069b0a00b0072b4fc24b07mr31440097ejc.700.1658238613539; Tue, 19 Jul 2022 06:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238613; cv=none; d=google.com; s=arc-20160816; b=Q3gGW5/1aLooMP59MgiSslIg7Wr1KGLQnA8OAYkYxdTQWon5JMYuAlQRf/NRORwj3W BpdQuGaKj5O/fQTWxXLETvQ5iVJ6fg5/GoLnU4K8oip/DZh07ASxPn/vuoFtBerAqe+d HBsGyeXXyDPkZjsDf4yomyEwlUO+Lm89eHjqB+SLL2xeeYodrYxv1VBtJuFMBaTLj1rI hICKNcXOYYI2kClgyfaP0IDgfBInmHC5Q/SWsv+zn1zL1I2vUODEPRi+hB96r9eyR1dc VZn9i0APfD/HpNJNN8nBQhA1FAr3atV8l8GbIoIfeCUFkOLMxZ+wkNeoQ+lnZLjGsDHa JRsA== 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=0Yf2ohlJDDW3BLn6KXjpA3xl4BpAMxePp3bHhbfWAU4=; b=nqU5MYobaJCT4fsBI9tcR7jHJNv9rji2h0Y/tcltf5MRdo+pf2MScIB2DuKU/mi3E9 2Mzs7qj470ppSPhn1D92XvUhXhhDR3aPYfR7Lswv8k4GqcDO/lix0oYl3zgYFrBWn5zy yYTZ5fFS9MWpZ1mU8KeJV59EvgLP3Lu/rtYB1ZR3VMMs1ihnkq+WbWr+4PXWVCuG3kLZ lZ02qgDvlmPAbyrVaqZh65vAjWDq9KtvXd0bJh8eNTLM7OCCQonmcVEBeE+PF8/C8aJd LuPmo2c7o3d+R8C6jfpB6bJdltTnjNeQ+8KaAiatd4fhtXkyL2fYpxyIyTVpA6n6zGnM t4rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JaRZDlG8; 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 i14-20020a1709064fce00b0072aa56cd0a3si19977508ejw.28.2022.07.19.06.49.48; Tue, 19 Jul 2022 06:50:13 -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=JaRZDlG8; 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 S238209AbiGSMFy (ORCPT + 99 others); Tue, 19 Jul 2022 08:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238295AbiGSMEW (ORCPT ); Tue, 19 Jul 2022 08:04:22 -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 5C52420F66; Tue, 19 Jul 2022 05:00:14 -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 79B856163C; Tue, 19 Jul 2022 12:00:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B76BC341C6; Tue, 19 Jul 2022 12:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232012; bh=Qq1egKqaN2guD+MLaTNP3WxiufugS4HznBle4H2PDEA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JaRZDlG8l9aQ2ZbSKTO6IE3QHFjgFWIUqIMHnJoRLPwp/zNaXGa7n12EYnLZPYGlX oEnANF1LgSv+WI/WpdDfCRTDXFxVP2Vkfk6C6ind41/r4dbswcf+f/O07c5W5jcoLL aUqJJQVra7flMF4fEvjLmj+8vxljNxEjJ2GbzSiU= 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 4.19 12/48] ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle Date: Tue, 19 Jul 2022 13:53:49 +0200 Message-Id: <20220719114520.982991373@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114518.915546280@linuxfoundation.org> References: <20220719114518.915546280@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=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 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 40fb2900038e..e53f824a2583 100644 --- a/arch/arm/mm/proc-v7-bugs.c +++ b/arch/arm/mm/proc-v7-bugs.c @@ -222,10 +222,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