Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4451955imw; Tue, 19 Jul 2022 06:55:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1aeCWiTs5dTyKxm7D1SeAzJ60vkQSy6ZW/ehKpmcLwadqzcNPt25yyLx5QboaIycf2C3Z X-Received: by 2002:aa7:cb01:0:b0:437:8a8a:dbb3 with SMTP id s1-20020aa7cb01000000b004378a8adbb3mr43608610edt.74.1658238941912; Tue, 19 Jul 2022 06:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238941; cv=none; d=google.com; s=arc-20160816; b=tk8oOwZYdyDCkFNf7bGklYZoIiaX4fYiGLQprk0zZAZAlE7I5N/Srw/igA7uP4VDq7 5tCErgfP47GIILsUJ1hNxZ9AswzKmoZLjEhhYrY68qtwTaLvUdSdAPR/ZRQWn00GE61g StzDXLOE9iNFL+Fl3tw6KwrW36Xq/zHHWCuaZ8mI25q6rZ/BMrnC0dC8dTLakVbEP5Jt MI7bJGX2k12bYSKvorIfXKnC2iH+22HiWNv+/PCnkaTxCnYclNc9w49r05lwxtMdz3Bw 6dOQNpOeSIep5T5K2uPERdIk/pbqwJcVnnfJBc9OheUL32jKLk3Ikt/gYCcFUxibBS4f ThWg== 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=oFYCR8OHZ3jyzWibo/p7Nr8nMsBYMS7BXLc6+4lvKwVydc0BBA9tnnSmmOiPeoQZ2u 2FJhAKhrvqQlL/FPP/dOM/JJNhU1xY3uFrnP/IaW6O8gb9DD1xnjaRWXRonIkn8mYNgZ SDh8IADz6RkkRNAbr8y8TDLzPcSvVRlFeL+tuAGsQqJHbtQlVnfy6pVPz819pHMy0zTR K7T74BArBBX85E4mCJp66kKg1HEqtkrDwNiNerOveGgbNFyu4q8Tho4TXixb8hYH3VH+ U36rqmGk59dnhhjcbD/goH0QsEAw63ItF0p0bzPt++SUGPUnoAwJhugl0mUredXCVRVM pzNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1YiWtWVQ; 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 qf39-20020a1709077f2700b00726e777489csi22198381ejc.757.2022.07.19.06.55.17; Tue, 19 Jul 2022 06:55:41 -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=1YiWtWVQ; 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 S241818AbiGSMv4 (ORCPT + 99 others); Tue, 19 Jul 2022 08:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242254AbiGSMt6 (ORCPT ); Tue, 19 Jul 2022 08:49: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 44E4959258; Tue, 19 Jul 2022 05:19:58 -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 7AD7A6187F; Tue, 19 Jul 2022 12:19:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 474EDC341C6; Tue, 19 Jul 2022 12:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658233196; bh=fOlF4eY+hzJn4YXVxFeaaXj09DXc9UVTfIYTLEV6CfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1YiWtWVQueZqgQBjYSRNovevV9OUJwCTtSXPiWozCUfM/2YFZ9BXBej8mxioAc3Ba 9262uC3WYPkXnP8k+wGZYS91/LUCB6x4CPTOYZ9PoinrA6jiigSB/v8Rjict0Amboq Mnanc3VtvcmTRbhfFldjSkaStEjrEwteUU7WWFTg= 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.18 040/231] ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle Date: Tue, 19 Jul 2022 13:52:05 +0200 Message-Id: <20220719114717.617309685@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114714.247441733@linuxfoundation.org> References: <20220719114714.247441733@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