[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFoGMI_1I_cZ9O8g@U-2FWC9VHC-2323.local>
Date: Tue, 24 Jun 2025 09:58:08 +0800
From: Feng Tang <feng.tang@...ux.alibaba.com>
To: Petr Mladek <pmladek@...e.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 V2 5/5] panic: add note that panic_print interface is
deprecated
On Mon, Jun 23, 2025 at 05:22:20PM +0200, Petr Mladek wrote:
> On Mon 2025-06-16 09:08:40, Feng Tang wrote:
> > Long term wise, the 'panic_sys_info' should be the only controlling
> > interface, which can be referred by other modules.
>
> Strictly speaking, 'panic_sys_info' is not a complete
> replacement for 'panic_print' because it does not allow
> replaying the log buffer during panic.
Indeed, I forgot this part.
> I suggest to add a separate parameter "panic_console_replay"
> for the missing functionality first. And 'panic_print' will
> be obsoleted by both 'panic_sys_info' and 'panic_console_replay'.
Will do.
> > --- 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");
> > + 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,
>
> This handles only the sysctl interface. We should do something similar
> also for the "panic_print" command line parameter. It would require
> using core_param_cb() instead of core_param().
OK, thanks!
- Feng
> > },
> > {
> > .procname = "panic_on_warn",
>
> Best Regards,
> Petr
Powered by blists - more mailing lists