[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251031091507.1896-1-shechenglong@xfusion.com>
Date: Fri, 31 Oct 2025 17:15:04 +0800
From: shechenglong <shechenglong@...sion.com>
To: <mark.rutland@....com>, <catalin.marinas@....com>, <will@...nel.org>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<stone.xulei@...sion.com>, <chenjialong@...sion.com>,
<yuxiating@...sion.com>, shechenglong <shechenglong@...sion.com>
Subject: [PATCH v3 0/2] arm64: spectre: Fix hard lockup and cleanup mitigation messages
On Wed, Oct 29, 2025 at 11:45:54AM +0800, Will Deacon wrote:
> Is the compiler smart enough to store a single string for the
> "mitigation disabled by command-line option\n" part? If not,
> you might want to use %s to avoid wasting memory. (I was going to
> check with llvm but I'm unable to apply your changes due to whitespace
> corruption).
Thanks, Will, for the helpful review. v3 incorporates your suggestion by
factoring the common suffix into a single const string and switching the
pr_info() calls to use "%s". The whitespace corruption has also been fixed
(restore tabs, no line-wrapped literals), so this version should apply
cleanly.
This series addresses one main issues around Spectre mitigation messages:
1) Avoid multiple copies of the common suffix
"mitigation disabled by command-line option\n" by using a single
constant string and "%s" in pr_info().
v3 changes:
- Fix whitespace corruption (tabs vs spaces).
- Factor out the common suffix into a single static const and
use "%s" as suggested.
shechenglong (2):
cpu:Remove the print when the CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
Kconfig option is disabled.
cpu: fix hard lockup triggered by printk calls within scheduling
context
arch/arm64/include/asm/spectre.h | 1 +
arch/arm64/kernel/cpufeature.c | 6 ++++++
arch/arm64/kernel/proton-pack.c | 37 +++++++++++++++++---------------
3 files changed, 27 insertions(+), 17 deletions(-)
--
2.33.0
Powered by blists - more mailing lists