[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aV4JTGkMTMTbcT1p@U-2FWC9VHC-2323.local>
Date: Wed, 7 Jan 2026 15:20:44 +0800
From: Feng Tang <feng.tang@...ux.alibaba.com>
To: Gal Pressman <gal@...dia.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
Mark Bloch <mbloch@...dia.com>, Nimrod Oren <noren@...dia.com>
Subject: Re: [PATCH] panic: only warn about deprecated panic_print on write
access
On Wed, Jan 07, 2026 at 08:41:22AM +0200, Gal Pressman wrote:
> On 07/01/2026 5:00, Feng Tang wrote:
> >> @@ -1014,7 +1015,6 @@ static int panic_print_set(const char *val, const struct kernel_param *kp)
> >>
> >> static int panic_print_get(char *val, const struct kernel_param *kp)
> >> {
> >> - panic_print_deprecated();
> >
> > Actually this was intentional, in one of the patch version, this
> > panic_print_get() was not there but reusing the param_get_ulong().
> >
> > It was added later as sometimes developer do want to runtime check
> > the current 'panic_print' setting through /sys/module/kernel/parameters/
> > interface, and I thought it may be better to give the warning.
>
> I figured it would make sense to keep the behaviors consistent.
When people run 'sysctl -a', in 99.9% cases, the users don't care
'panic_print' or even don't know what 'panic_print' is, that's why
I think removing it makes sense.
But for a user running 'cat /sys/module/kernel/parameters/panic_rint',
giving a warning is meaningful.
If you insist so, the cleaner way would be
diff --git a/kernel/panic.c b/kernel/panic.c
index 0d52210a9e2b..86b927a695a0 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -1012,15 +1012,9 @@ static int panic_print_set(const char *val, const struct kernel_param *kp)
return param_set_ulong(val, kp);
}
-static int panic_print_get(char *val, const struct kernel_param *kp)
-{
- panic_print_deprecated();
- return param_get_ulong(val, kp);
-}
-
static const struct kernel_param_ops panic_print_ops = {
.set = panic_print_set,
- .get = panic_print_get,
+ .get = param_get_ulong,
};
__core_param_cb(panic_print, &panic_print_ops, &panic_print, 0644);
Powered by blists - more mailing lists