[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQN7H7qfXbQSHEjA@willie-the-truck>
Date: Thu, 30 Oct 2025 14:50:07 +0000
From: Will Deacon <will@...nel.org>
To: shechenglong <shechenglong@...sion.com>
Cc: mark.rutland@....com, catalin.marinas@....com,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	stone.xulei@...sion.com, chenjialong@...sion.com,
	yuxiating@...sion.com
Subject: Re: [PATCH v2 2/2] cpu: fix hard lockup triggered by printk calls
 within scheduling context
On Wed, Oct 29, 2025 at 11:45:54AM +0800, shechenglong wrote:
> @@ -1197,3 +1185,15 @@ void unpriv_ebpf_notify(int new_state)
>                 pr_err("WARNING: %s", EBPF_WARN);
>  }
>  #endif
> +
> +void spectre_print_disabled_mitigations(void)
> +{
> +       if (spectre_v2_mitigations_off())
> +               pr_info("spectre-v2 mitigation disabled by command-line option\n");
> +
> +       if (spectre_v4_mitigations_off())
> +               pr_info("spectre-v4 mitigation disabled by command-line option\n");
> +
> +       if (__nospectre_bhb || cpu_mitigations_off())
> +               pr_info("spectre-bhb mitigation disabled by command-line option\n");
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).
Will
Powered by blists - more mailing lists
 
