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: <0088c3f5-d2a0-48c4-b69a-fb385c527b32@linux.dev>
Date: Mon, 16 Jun 2025 09:45:16 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: Feng Tang <feng.tang@...ux.alibaba.com>
Cc: paulmck@...nel.org, john.ogness@...utronix.de,
 Petr Mladek <pmladek@...e.com>, Andrew Morton <akpm@...ux-foundation.org>,
 Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
 Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH V2 5/5] panic: add note that panic_print interface is
 deprecated



On 2025/6/16 09:08, Feng Tang wrote:
> Long term wise, the 'panic_sys_info' should be the only controlling
> interface, which can be referred by other modules.
> 
> Suggested-by: Petr Mladek <pmladek@...e.com>
> Signed-off-by: Feng Tang <feng.tang@...ux.alibaba.com>
> ---
>   kernel/panic.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/panic.c b/kernel/panic.c
> index ea238f7d4b54..e8a05fc6b733 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -76,6 +76,13 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
>   EXPORT_SYMBOL(panic_notifier_list);
>   
>   #ifdef CONFIG_SYSCTL
> +static int sysctl_panic_print_handler(const struct ctl_table *table, int write,
> +			   void *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	printk_once("panic: 'panic_print' sysctl interface will be obsoleted by 'panic_sys_info' interface.\n");

Hmm... I would get scared for a second when I read messages prefixed 
with "panic:"
from dmesg. That prefix should have a very specific meaning ;)

Well, we can just change the prefix to something more neutral:

printk_once("Kernel: 'panic_print' sysctl interface will be obsoleted by 
'panic_sys_info' interface.\n");

Thanks,
Lance

> +	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
> +}
> +
>   static const struct ctl_table kern_panic_table[] = {
>   #ifdef CONFIG_SMP
>   	{
> @@ -107,7 +114,7 @@ static const struct ctl_table kern_panic_table[] = {
>   		.data		= &panic_print,
>   		.maxlen		= sizeof(unsigned long),
>   		.mode		= 0644,
> -		.proc_handler	= proc_doulongvec_minmax,
> +		.proc_handler	= sysctl_panic_print_handler,
>   	},
>   	{
>   		.procname	= "panic_on_warn",


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ