linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Feng Tang <feng.tang@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Lance Yang <lance.yang@linux.dev>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-kernel@vger.kernel.org, paulmck@kernel.org,
	john.ogness@linutronix.de
Subject: Re: [PATCH v3 5/5] panic: add note that panic_print sysctl interface is deprecated
Date: Tue, 12 Aug 2025 13:52:58 +0200	[thread overview]
Message-ID: <aJsrGgTYxtEhZ7jX@pathway> (raw)
In-Reply-To: <20250703021004.42328-6-feng.tang@linux.alibaba.com>

On Thu 2025-07-03 10:10:04, Feng Tang wrote:
> Add a dedicated core parameter 'panic_console_replay' for controlling
> console replay, and add note that 'panic_print' sysctl interface  will
> be obsoleted by 'panic_sys_info' and 'panic_console_replay'.  When it
> happens, the SYS_INFO_PANIC_CONSOLE_REPLAY can be removed as well.
> 
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -77,6 +78,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)
> +{
> +	pr_info_once("Kernel: 'panic_print' sysctl interface will be obsoleted by both 'panic_sys_info' and 'panic_console_replay'\n");
> +	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
> +}

This warning is printed "only" when the value is accessed via the
procfs. It would be great to print it also when it is set
via the command line parameter.

It would require replacing

core_param(panic_print, panic_print, ulong, 0644);

with

core_param_cb(panic_print, &panic_print_ops, &panic_print, 0644);

Best Regards,
Petr

  reply	other threads:[~2025-08-12 11:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03  2:09 [PATCH v3 0/5] generalize panic_print's dump function to be used by other kernel parts Feng Tang
2025-07-03  2:10 ` [PATCH v3 1/5] panic: clean up code for console replay Feng Tang
2025-07-14 21:09   ` Askar Safin
2025-07-15  0:49     ` Feng Tang
2025-07-15  1:18       ` Askar Safin
2025-07-15  1:34         ` Feng Tang
2025-07-15  2:48           ` Askar Safin
2025-07-15  3:27             ` Feng Tang
2025-08-12 11:59               ` Petr Mladek
2025-08-13  0:43                 ` Feng Tang
2025-07-03  2:10 ` [PATCH v3 2/5] panic: generalize panic_print's function to show sys info Feng Tang
2025-08-12 10:12   ` Petr Mladek
2025-07-03  2:10 ` [PATCH 3/5] panic: add 'panic_sys_info' sysctl to take human readable string parameter Feng Tang
2025-07-03  2:56   ` Lance Yang
2025-07-03  3:18     ` Feng Tang
2025-08-12 10:23   ` Petr Mladek
2025-08-13  0:39     ` Feng Tang
2025-07-03  2:10 ` [PATCH v3 4/5] panic: add 'panic_sys_info=' setup option for kernel cmdline Feng Tang
2025-08-12 10:31   ` Petr Mladek
2025-07-03  2:10 ` [PATCH v3 5/5] panic: add note that panic_print sysctl interface is deprecated Feng Tang
2025-08-12 11:52   ` Petr Mladek [this message]
2025-08-13  1:05     ` Feng Tang
2025-08-14 15:21       ` Petr Mladek
2025-07-03  3:23 ` [PATCH v3 0/5] generalize panic_print's dump function to be used by other kernel parts Lance Yang
2025-07-03  4:56   ` Lance Yang
2025-07-03  5:54     ` Feng Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJsrGgTYxtEhZ7jX@pathway \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=feng.tang@linux.alibaba.com \
    --cc=john.ogness@linutronix.de \
    --cc=lance.yang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).