Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4451192imw; Tue, 19 Jul 2022 06:54:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sDs4uQWUZjx8pA+XF61Pv2P6aAmoRpdnPTiTmAZXB75IGKtWqbqCvLenPa/N1NcTGFa1lY X-Received: by 2002:a05:6402:e96:b0:43a:f21f:42a0 with SMTP id h22-20020a0564020e9600b0043af21f42a0mr44769500eda.382.1658238891078; Tue, 19 Jul 2022 06:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238891; cv=none; d=google.com; s=arc-20160816; b=LogXZhzV0npsElGS2stKwk+TqgWwqarqkvZV1t9NPe4ujssaecdU7lXWJouV2FO0wu 0WjTpqLhxqk6lkxrRnnL5n3fy1vqf4d8Z03vKLVyRpthuiRyUgWDgnCVUY2NKGCZURdV t+ej6Mvl7Ys7gbiBkqm2SVBAJg02I4IaSzs8FFrJ6sDbS6OLp1IOKNVlxP6ijzmii+MU kivip2fCKo47ieRNF2vPJO6VbMKZpLyRblbNIWAgEHQE/vZVmjemp9K6oXPKi0vF4WGG 6Qxaz9S3cHKS4rYn3v2HRbKO4VKcQzRBU0AP4ZoTIZyOyY5lCTGaCxBlkh3kcZT0JiDF csWQ== 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=Yz429OalEtMQNHFMTjCGzuWS6jnEvXamexQNPr7zZmI=; b=Nak8j9927g/Td5P8ag5sFR4Zarz34v2pG0bKaiFa6LOYTQvtKB+V3I2xajmvWQPo6p 42523WnBcXixeACvmlCzJGve+EMVRAZsq4lGWvVndNhmKOaw4l8dynIKKPJxdpFyCYgF 80BcUthkFOAaglw4az0ikv/uQanQEQ95MTKEUCpHbWgzNlDbhlAkjY8GfVUbIE+mTjzc bTFIkdvqqMM6m1KjLnDgJRV0kkrLQB90FLtgsv4c0AIawdviafmq/zWkoW2bVglzs7TE XAweE31IsJOEkRLPYPQpKCBXmD/WzNX6tmY4abxrEVY6NrgIZ+FXoULopnsGv2WFzPxG eOAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fiJprmg0; 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 qw29-20020a1709066a1d00b0072b83ed8d42si15278956ejc.82.2022.07.19.06.54.26; Tue, 19 Jul 2022 06:54:51 -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=fiJprmg0; 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 S239107AbiGSMRe (ORCPT + 99 others); Tue, 19 Jul 2022 08:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239171AbiGSMPd (ORCPT ); Tue, 19 Jul 2022 08:15:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BDA455084; Tue, 19 Jul 2022 05:06: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 ams.source.kernel.org (Postfix) with ESMTPS id 907BDB81B13; Tue, 19 Jul 2022 12:05:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC414C341C6; Tue, 19 Jul 2022 12:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232348; bh=fOlF4eY+hzJn4YXVxFeaaXj09DXc9UVTfIYTLEV6CfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fiJprmg0diloWLFCvj6hzV0RoU4UeWbARVMLPKm5rzHz3CCkNamX7739zY3kjb7zH wMdP9m3G2gUuBhRooDzE7zA3BfR4x5m7Y3AHMk+soHgsJxUBRhXLM3s/Ze1XzpnDAq hJk300JADvrENZXFasQJtRc+pd6X+ukD9NPYbPak= 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.10 027/112] ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle Date: Tue, 19 Jul 2022 13:53:20 +0200 Message-Id: <20220719114628.659718650@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114626.156073229@linuxfoundation.org> References: <20220719114626.156073229@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 f9730eba0632..8bc7a2d6d6c7 100644 --- a/arch/arm/mm/proc-v7-bugs.c +++ b/arch/arm/mm/proc-v7-bugs.c @@ -208,10 +208,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