lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKRIZnm8EBaPjl8G@pathway.suse.cz>
Date: Tue, 19 Aug 2025 11:48:22 +0200
From: Petr Mladek <pmladek@...e.com>
To: Feng Tang <feng.tang@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Lance Yang <lance.yang@...ux.dev>, Jonathan Corbet <corbet@....net>,
	linux-kernel@...r.kernel.org, paulmck@...nel.org,
	john.ogness@...utronix.de
Subject: Re: [PATCH 3/3] panic: add note that 'panic_print' parameter is
 deprecated

On Fri 2025-08-15 15:14:28, Feng Tang wrote:
> Just like for 'panic_print's systcl interface, add similar note for
> setup of kernel cmdline parameter and parameter under /sys/module/kernel/.
> 
> Also add __core_param_cb() macro, which enables to add special get/set
> operation for a kernel parameter.



> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -937,12 +937,29 @@ EXPORT_SYMBOL(__stack_chk_fail);
>  #endif
>  
>  core_param(panic, panic_timeout, int, 0644);
> -core_param(panic_print, panic_print, ulong, 0644);
>  core_param(pause_on_oops, pause_on_oops, int, 0644);
>  core_param(panic_on_warn, panic_on_warn, int, 0644);
>  core_param(crash_kexec_post_notifiers, crash_kexec_post_notifiers, bool, 0644);
>  core_param(panic_console_replay, panic_console_replay, bool, 0644);
>  
> +static int panic_print_set(const char *val, const struct kernel_param *kp)
> +{
> +	pr_info_once("Kernel: 'panic_print' parameter will be obsoleted by both 'panic_sys_info' and 'panic_console_replay'\n");
> +	return  param_set_ulong(val, kp);
> +}
> +
> +static int panic_print_get(char *val, const struct kernel_param *kp)
> +{
> +	pr_info_once("Kernel: 'panic_print' parameter will be obsoleted by both 'panic_sys_info' and 'panic_console_replay'\n");
> +	return  param_get_ulong(val, kp);
> +}

It should be enough to print the message only once and avoid
duplication in the sources.

Also I would make the message more direct, something like:

	pr_info_once("Kernel: The 'panic_print' parameter is now deprecated. Please use 'panic_sys_info' and 'panic_console_replay' instead.\n");

I am going to send a followup patch. Feel free to keep this one as is:

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ