* [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
@ 2026-06-23 15:34 Bradley Morgan
2026-06-23 15:34 ` [PATCH v2 2/4] watchdog: avoid sys_info fallback for all_bt Bradley Morgan
` (5 more replies)
0 siblings, 6 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-23 15:34 UTC (permalink / raw)
To: Petr Mladek, Feng Tang, Andrew Morton
Cc: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Mukesh Kumar Chaurasiya, Andy Shevchenko,
Jinchao Wang, Kees Cook, Rio, Joel Granados, Pnina Feder,
Petr Pavlu, Sergey Senozhatsky, Douglas Anderson, Mayank Rungta,
Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel, stable,
Bradley Morgan
Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
Add a helper that strips that bit without turning an all_bt only mask into
a kernel_sys_info fallback.
Signed-off-by: Bradley Morgan <include@grrlz.net>
---
Changes since v1:
- New patch for the shared helper suggested by Petr.
include/linux/sys_info.h | 1 +
lib/sys_info.c | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/include/linux/sys_info.h b/include/linux/sys_info.h
index a5bc3ea3d44b..87a841ec7b6a 100644
--- a/include/linux/sys_info.h
+++ b/include/linux/sys_info.h
@@ -18,6 +18,7 @@
#define SYS_INFO_BLOCKED_TASKS 0x00000080
void sys_info(unsigned long si_mask);
+void sys_info_without_all_bt(unsigned long si_mask);
unsigned long sys_info_parse_param(char *str);
#ifdef CONFIG_SYSCTL
diff --git a/lib/sys_info.c b/lib/sys_info.c
index f32a06ec9ed4..6afd4c697633 100644
--- a/lib/sys_info.c
+++ b/lib/sys_info.c
@@ -164,3 +164,18 @@ void sys_info(unsigned long si_mask)
{
__sys_info(si_mask ? : kernel_si_mask);
}
+
+void sys_info_without_all_bt(unsigned long si_mask)
+{
+ unsigned long dump_mask = si_mask & ~SYS_INFO_ALL_BT;
+
+ /*
+ * Do not call sys_info() when the caller context required only
+ * backtraces from all CPUs. Otherwise sys_info() would fall back
+ * to the generic kernel_si_mask.
+ */
+ if (si_mask && !dump_mask)
+ return;
+
+ sys_info(dump_mask);
+}
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 2/4] watchdog: avoid sys_info fallback for all_bt
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
@ 2026-06-23 15:34 ` Bradley Morgan
2026-06-23 15:35 ` [PATCH v2 3/4] powerpc/watchdog: " Bradley Morgan
` (4 subsequent siblings)
5 siblings, 0 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-23 15:34 UTC (permalink / raw)
To: Petr Mladek, Feng Tang, Andrew Morton
Cc: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Mukesh Kumar Chaurasiya, Andy Shevchenko,
Jinchao Wang, Kees Cook, Rio, Joel Granados, Pnina Feder,
Petr Pavlu, Sergey Senozhatsky, Douglas Anderson, Mayank Rungta,
Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel, stable,
Bradley Morgan
The watchdog prints all CPU backtraces itself. When the watchdog mask
contains only SYS_INFO_ALL_BT, stripping that bit leaves zero and
sys_info(0) falls back to kernel_sys_info.
Use sys_info_without_all_bt() so an explicit all_bt mask does not request
the global default.
Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup")
Cc: stable@vger.kernel.org
Signed-off-by: Bradley Morgan <include@grrlz.net>
---
Changes since v1:
- Use the shared sys_info_without_all_bt() helper.
- Keep the generic watchdog change separate from powerpc.
kernel/watchdog.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 87dd5e0f6968..5bf24231a5d8 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -208,6 +208,7 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
{
int hardlockup_all_cpu_backtrace;
unsigned int this_cpu;
+ unsigned long si_mask;
unsigned long flags;
if (per_cpu(watchdog_hardlockup_touched, cpu)) {
@@ -216,7 +217,8 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
return;
}
- hardlockup_all_cpu_backtrace = (hardlockup_si_mask & SYS_INFO_ALL_BT) ?
+ si_mask = READ_ONCE(hardlockup_si_mask);
+ hardlockup_all_cpu_backtrace = (si_mask & SYS_INFO_ALL_BT) ?
1 : sysctl_hardlockup_all_cpu_backtrace;
/*
* Check for a hardlockup by making sure the CPU's timer
@@ -286,7 +288,7 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
clear_bit_unlock(0, &hard_lockup_nmi_warn);
}
- sys_info(hardlockup_si_mask & ~SYS_INFO_ALL_BT);
+ sys_info_without_all_bt(si_mask);
if (hardlockup_panic)
nmi_panic(regs, "Hard LOCKUP");
@@ -798,6 +800,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
struct pt_regs *regs = get_irq_regs();
int softlockup_all_cpu_backtrace;
int duration, thresh_count;
+ unsigned long si_mask;
unsigned long flags;
if (!watchdog_enabled)
@@ -809,7 +812,8 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
if (panic_in_progress())
return HRTIMER_NORESTART;
- softlockup_all_cpu_backtrace = (softlockup_si_mask & SYS_INFO_ALL_BT) ?
+ si_mask = READ_ONCE(softlockup_si_mask);
+ softlockup_all_cpu_backtrace = (si_mask & SYS_INFO_ALL_BT) ?
1 : sysctl_softlockup_all_cpu_backtrace;
watchdog_hardlockup_kick();
@@ -900,7 +904,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
}
add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
- sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT);
+ sys_info_without_all_bt(si_mask);
thresh_count = duration / get_softlockup_thresh();
if (softlockup_panic && thresh_count >= softlockup_panic)
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 3/4] powerpc/watchdog: avoid sys_info fallback for all_bt
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
2026-06-23 15:34 ` [PATCH v2 2/4] watchdog: avoid sys_info fallback for all_bt Bradley Morgan
@ 2026-06-23 15:35 ` Bradley Morgan
2026-06-23 15:35 ` [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info Bradley Morgan
` (3 subsequent siblings)
5 siblings, 0 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-23 15:35 UTC (permalink / raw)
To: Petr Mladek, Feng Tang, Andrew Morton
Cc: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Mukesh Kumar Chaurasiya, Andy Shevchenko,
Jinchao Wang, Kees Cook, Rio, Joel Granados, Pnina Feder,
Petr Pavlu, Sergey Senozhatsky, Douglas Anderson, Mayank Rungta,
Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel, stable,
Bradley Morgan
The powerpc watchdog prints all CPU backtraces itself. When the watchdog
mask contains only SYS_INFO_ALL_BT, stripping that bit leaves zero and
sys_info(0) falls back to kernel_sys_info.
Use sys_info_without_all_bt() so an explicit all_bt mask does not request
the global default.
Fixes: e561383a39ed ("powerpc/watchdog: add support for hardlockup_sys_info sysctl")
Cc: stable@vger.kernel.org
Signed-off-by: Bradley Morgan <include@grrlz.net>
---
Changes since v1:
- Use the shared sys_info_without_all_bt() helper.
- Keep the powerpc watchdog change in its own patch.
arch/powerpc/kernel/watchdog.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index c40c69368476..813f9d48a6be 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -201,6 +201,7 @@ static bool set_cpu_stuck(int cpu)
static void watchdog_smp_panic(int cpu)
{
static cpumask_t wd_smp_cpus_ipi; // protected by reporting
+ unsigned long si_mask;
unsigned long flags;
u64 tb, last_reset;
int c;
@@ -236,8 +237,9 @@ static void watchdog_smp_panic(int cpu)
pr_emerg("CPU %d TB:%lld, last SMP heartbeat TB:%lld (%lldms ago)\n",
cpu, tb, last_reset, tb_to_ns(tb - last_reset) / 1000000);
+ si_mask = READ_ONCE(hardlockup_si_mask);
if (sysctl_hardlockup_all_cpu_backtrace ||
- (hardlockup_si_mask & SYS_INFO_ALL_BT)) {
+ (si_mask & SYS_INFO_ALL_BT)) {
trigger_allbutcpu_cpu_backtrace(cpu);
cpumask_clear(&wd_smp_cpus_ipi);
} else {
@@ -251,7 +253,7 @@ static void watchdog_smp_panic(int cpu)
}
}
- sys_info(hardlockup_si_mask & ~SYS_INFO_ALL_BT);
+ sys_info_without_all_bt(si_mask);
if (hardlockup_panic)
nmi_panic(NULL, "Hard LOCKUP");
@@ -371,6 +373,7 @@ static void watchdog_timer_interrupt(int cpu)
DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt)
{
+ unsigned long si_mask;
unsigned long flags;
int cpu = raw_smp_processor_id();
u64 tb;
@@ -418,11 +421,12 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt)
xchg(&__wd_nmi_output, 1); // see wd_lockup_ipi
+ si_mask = READ_ONCE(hardlockup_si_mask);
if (sysctl_hardlockup_all_cpu_backtrace ||
- (hardlockup_si_mask & SYS_INFO_ALL_BT))
+ (si_mask & SYS_INFO_ALL_BT))
trigger_allbutcpu_cpu_backtrace(cpu);
- sys_info(hardlockup_si_mask & ~SYS_INFO_ALL_BT);
+ sys_info_without_all_bt(si_mask);
if (hardlockup_panic)
nmi_panic(regs, "Hard LOCKUP");
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
2026-06-23 15:34 ` [PATCH v2 2/4] watchdog: avoid sys_info fallback for all_bt Bradley Morgan
2026-06-23 15:35 ` [PATCH v2 3/4] powerpc/watchdog: " Bradley Morgan
@ 2026-06-23 15:35 ` Bradley Morgan
2026-06-24 2:50 ` Feng Tang
2026-06-23 20:11 ` [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Andy Shevchenko
` (2 subsequent siblings)
5 siblings, 1 reply; 22+ messages in thread
From: Bradley Morgan @ 2026-06-23 15:35 UTC (permalink / raw)
To: Petr Mladek, Feng Tang, Andrew Morton
Cc: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Mukesh Kumar Chaurasiya, Andy Shevchenko,
Jinchao Wang, Kees Cook, Rio, Joel Granados, Pnina Feder,
Petr Pavlu, Sergey Senozhatsky, Douglas Anderson, Mayank Rungta,
Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel, stable,
Bradley Morgan
panic_other_cpus_shutdown() handles SYS_INFO_ALL_BT before stopping the
other CPUs. Do not ask sys_info() to handle that bit again later in the
panic path.
Use sys_info_without_all_bt() so panic_print=all_bt does not request more
output after the CPUs are stopped.
Fixes: b76e89e50fc3 ("panic: generalize panic_print's function to show sys info")
Cc: stable@vger.kernel.org
Signed-off-by: Bradley Morgan <include@grrlz.net>
---
Changes since v1:
- New patch using the same helper for panic.
kernel/panic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index d030f88ad4ef..2cf229c7c0cf 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -683,7 +683,7 @@ void vpanic(const char *fmt, va_list args)
*/
atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
- sys_info(panic_print);
+ sys_info_without_all_bt(panic_print);
kmsg_dump_desc(KMSG_DUMP_PANIC, buf);
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
` (2 preceding siblings ...)
2026-06-23 15:35 ` [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info Bradley Morgan
@ 2026-06-23 20:11 ` Andy Shevchenko
2026-06-23 20:14 ` Andy Shevchenko
2026-06-24 20:34 ` Andrew Morton
2026-06-25 14:03 ` Petr Mladek
5 siblings, 1 reply; 22+ messages in thread
From: Andy Shevchenko @ 2026-06-23 20:11 UTC (permalink / raw)
To: Bradley Morgan
Cc: Petr Mladek, Feng Tang, Andrew Morton, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Mukesh Kumar Chaurasiya, Jinchao Wang, Kees Cook, Rio,
Joel Granados, Pnina Feder, Petr Pavlu, Sergey Senozhatsky,
Douglas Anderson, Mayank Rungta, Tejun Heo, Zhenguo Yao,
linuxppc-dev, linux-kernel, stable
On Tue, Jun 23, 2026 at 03:34:58PM +0000, Bradley Morgan wrote:
> Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
> Add a helper that strips that bit without turning an all_bt only mask into
> a kernel_sys_info fallback.
You also want a getter with check
bool sysinfo_is_all_bt_enabled(..., *si_mask)
where *si_mask is the result of READ_ONCE() that you keep as implementation
detail inside this helper.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-23 20:11 ` [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Andy Shevchenko
@ 2026-06-23 20:14 ` Andy Shevchenko
2026-06-23 20:16 ` Bradley Morgan
0 siblings, 1 reply; 22+ messages in thread
From: Andy Shevchenko @ 2026-06-23 20:14 UTC (permalink / raw)
To: Bradley Morgan
Cc: Petr Mladek, Feng Tang, Andrew Morton, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Mukesh Kumar Chaurasiya, Jinchao Wang, Kees Cook, Rio,
Joel Granados, Pnina Feder, Petr Pavlu, Sergey Senozhatsky,
Douglas Anderson, Mayank Rungta, Tejun Heo, Zhenguo Yao,
linuxppc-dev, linux-kernel, stable
On Tue, Jun 23, 2026 at 11:11:34PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 23, 2026 at 03:34:58PM +0000, Bradley Morgan wrote:
> > Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
> > Add a helper that strips that bit without turning an all_bt only mask into
> > a kernel_sys_info fallback.
>
> You also want a getter with check
>
> bool sysinfo_is_all_bt_enabled(..., *si_mask)
>
> where *si_mask is the result of READ_ONCE() that you keep as implementation
> detail inside this helper.
Ah, sorry, I have thought that the mask is part of sysinfo implementation.
Disregard my above comment, it can't be done without also supplying the pointer
to the original one, which makes no sense.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-23 20:14 ` Andy Shevchenko
@ 2026-06-23 20:16 ` Bradley Morgan
0 siblings, 0 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-23 20:16 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Petr Mladek, Feng Tang, Andrew Morton, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Mukesh Kumar Chaurasiya, Jinchao Wang, Kees Cook, Rio,
Joel Granados, Pnina Feder, Petr Pavlu, Sergey Senozhatsky,
Douglas Anderson, Mayank Rungta, Tejun Heo, Zhenguo Yao,
linuxppc-dev, linux-kernel, stable
On June 23, 2026 9:14:52 PM GMT+01:00, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>On Tue, Jun 23, 2026 at 11:11:34PM +0300, Andy Shevchenko wrote:
>> On Tue, Jun 23, 2026 at 03:34:58PM +0000, Bradley Morgan wrote:
>> > Some callers handle SYS_INFO_ALL_BT themselves before calling
>sys_info().
>> > Add a helper that strips that bit without turning an all_bt only mask
>into
>> > a kernel_sys_info fallback.
>>
>> You also want a getter with check
>>
>> bool sysinfo_is_all_bt_enabled(..., *si_mask)
>>
>> where *si_mask is the result of READ_ONCE() that you keep as
>implementation
>> detail inside this helper.
>
>Ah, sorry, I have thought that the mask is part of sysinfo implementation.
>Disregard my above comment, it can't be done without also supplying the
>pointer
>to the original one, which makes no sense.
Ah, yeah, I was gonna say that.
No worries, will disregard! :)
>
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info
2026-06-23 15:35 ` [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info Bradley Morgan
@ 2026-06-24 2:50 ` Feng Tang
2026-06-24 16:12 ` Bradley Morgan
0 siblings, 1 reply; 22+ messages in thread
From: Feng Tang @ 2026-06-24 2:50 UTC (permalink / raw)
To: Bradley Morgan
Cc: Petr Mladek, Andrew Morton, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On Tue, Jun 23, 2026 at 03:35:01PM +0000, Bradley Morgan wrote:
> panic_other_cpus_shutdown() handles SYS_INFO_ALL_BT before stopping the
> other CPUs. Do not ask sys_info() to handle that bit again later in the
> panic path.
>
> Use sys_info_without_all_bt() so panic_print=all_bt does not request more
> output after the CPUs are stopped.
Good catch! Thanks!
Later in panic_other_cpus_shutdown(), it sends IPIs to stop other CPUs, and
this patch does avoid dumping local call trace again!
For the whole serie, feel free to add:
Reviewed-by: Feng Tang <feng.tang@linux.alibaba.com>
Thanks,
Feng
>
> Fixes: b76e89e50fc3 ("panic: generalize panic_print's function to show sys info")
> Cc: stable@vger.kernel.org
> Signed-off-by: Bradley Morgan <include@grrlz.net>
> ---
> Changes since v1:
> - New patch using the same helper for panic.
>
> kernel/panic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/panic.c b/kernel/panic.c
> index d030f88ad4ef..2cf229c7c0cf 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -683,7 +683,7 @@ void vpanic(const char *fmt, va_list args)
> */
> atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
>
> - sys_info(panic_print);
> + sys_info_without_all_bt(panic_print);
>
> kmsg_dump_desc(KMSG_DUMP_PANIC, buf);
>
> --
> 2.53.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info
2026-06-24 2:50 ` Feng Tang
@ 2026-06-24 16:12 ` Bradley Morgan
2026-06-25 3:33 ` Feng Tang
0 siblings, 1 reply; 22+ messages in thread
From: Bradley Morgan @ 2026-06-24 16:12 UTC (permalink / raw)
To: Feng Tang
Cc: Petr Mladek, Andrew Morton, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On June 24, 2026 3:50:27 AM GMT+01:00, Feng Tang
<feng.tang@linux.alibaba.com> wrote:
>On Tue, Jun 23, 2026 at 03:35:01PM +0000, Bradley Morgan wrote:
>> panic_other_cpus_shutdown() handles SYS_INFO_ALL_BT before stopping the
>> other CPUs. Do not ask sys_info() to handle that bit again later in the
>> panic path.
>>
>> Use sys_info_without_all_bt() so panic_print=all_bt does not request
>more
>> output after the CPUs are stopped.
>
>Good catch! Thanks!
>
>Later in panic_other_cpus_shutdown(), it sends IPIs to stop other CPUs,
>and
>this patch does avoid dumping local call trace again!
>
>For the whole serie, feel free to add:
>
>Reviewed-by: Feng Tang <feng.tang@linux.alibaba.com>
>
>Thanks,
>Feng
Thanks a lot Feng!
All 4 patches, right?
I'll let the maintainer (whomever will merge it) merge it, and add
your tag!
If you would like, Feng, if you CC me on any watchdog, etc etc patch,
I'm sure I'll help review! :)
Thanks for your tag.
>>
>> Fixes: b76e89e50fc3 ("panic: generalize panic_print's function to show
>sys info")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Bradley Morgan <include@grrlz.net>
>> ---
>> Changes since v1:
>> - New patch using the same helper for panic.
>>
>> kernel/panic.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/panic.c b/kernel/panic.c
>> index d030f88ad4ef..2cf229c7c0cf 100644
>> --- a/kernel/panic.c
>> +++ b/kernel/panic.c
>> @@ -683,7 +683,7 @@ void vpanic(const char *fmt, va_list args)
>> */
>> atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
>>
>> - sys_info(panic_print);
>> + sys_info_without_all_bt(panic_print);
>>
>> kmsg_dump_desc(KMSG_DUMP_PANIC, buf);
>>
>> --
>> 2.53.0
>
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
` (3 preceding siblings ...)
2026-06-23 20:11 ` [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Andy Shevchenko
@ 2026-06-24 20:34 ` Andrew Morton
2026-06-24 20:44 ` Bradley Morgan
2026-06-25 15:30 ` Fixed tag magic: was: " Petr Mladek
2026-06-25 14:03 ` Petr Mladek
5 siblings, 2 replies; 22+ messages in thread
From: Andrew Morton @ 2026-06-24 20:34 UTC (permalink / raw)
To: Bradley Morgan
Cc: Petr Mladek, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net> wrote:
> Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
> Add a helper that strips that bit without turning an all_bt only mask into
> a kernel_sys_info fallback.
I assume this patch wants a Fixes: and a cc:stable also.
It would be nice to have the conventional [0/N] cover letter to tell
readers what this is all about.
The patches all have different Fixes: targets. This risks inviting the
-stable maintainers to merge only some of the patches into some
kernels, resulting in an untested combination and which might break
things.
It would be cleaner to make all patches have the same Fixes: target if
possible.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-24 20:34 ` Andrew Morton
@ 2026-06-24 20:44 ` Bradley Morgan
2026-06-25 6:25 ` Andy Shevchenko
2026-06-25 15:30 ` Fixed tag magic: was: " Petr Mladek
1 sibling, 1 reply; 22+ messages in thread
From: Bradley Morgan @ 2026-06-24 20:44 UTC (permalink / raw)
To: Andrew Morton
Cc: Petr Mladek, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On June 24, 2026 9:34:19 PM GMT+01:00, Andrew Morton
<akpm@linux-foundation.org> wrote:
>On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net>
>wrote:
>
>> Some callers handle SYS_INFO_ALL_BT themselves before calling
>sys_info().
>> Add a helper that strips that bit without turning an all_bt only mask
>into
>> a kernel_sys_info fallback.
>
>I assume this patch wants a Fixes: and a cc:stable also.
Fixes, perhaps
Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup") ?
>It would be nice to have the conventional [0/N] cover letter to tell
>readers what this is all about.
I added a what I changed? I'm iffy on cover letters, if you want I'll do
it...
>The patches all have different Fixes: targets. This risks inviting the
>-stable maintainers to merge only some of the patches into some
>kernels, resulting in an untested combination and which might break
>things.
In merge-time, could we do
Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup")
>It would be cleaner to make all patches have the same Fixes: target if
>possible.
Ditto.
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info
2026-06-24 16:12 ` Bradley Morgan
@ 2026-06-25 3:33 ` Feng Tang
0 siblings, 0 replies; 22+ messages in thread
From: Feng Tang @ 2026-06-25 3:33 UTC (permalink / raw)
To: Bradley Morgan
Cc: Petr Mladek, Andrew Morton, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On Wed, Jun 24, 2026 at 05:12:28PM +0100, Bradley Morgan wrote:
> On June 24, 2026 3:50:27 AM GMT+01:00, Feng Tang
> <feng.tang@linux.alibaba.com> wrote:
> >On Tue, Jun 23, 2026 at 03:35:01PM +0000, Bradley Morgan wrote:
> >> panic_other_cpus_shutdown() handles SYS_INFO_ALL_BT before stopping the
> >> other CPUs. Do not ask sys_info() to handle that bit again later in the
> >> panic path.
> >>
> >> Use sys_info_without_all_bt() so panic_print=all_bt does not request
> >more
> >> output after the CPUs are stopped.
> >
> >Good catch! Thanks!
> >
> >Later in panic_other_cpus_shutdown(), it sends IPIs to stop other CPUs,
> >and
> >this patch does avoid dumping local call trace again!
> >
> >For the whole serie, feel free to add:
> >
> >Reviewed-by: Feng Tang <feng.tang@linux.alibaba.com>
> >
> >Thanks,
> >Feng
>
> Thanks a lot Feng!
>
> All 4 patches, right?
Yes.
>
> I'll let the maintainer (whomever will merge it) merge it, and add
> your tag!
>
> If you would like, Feng, if you CC me on any watchdog, etc etc patch,
> I'm sure I'll help review! :)
>
> Thanks for your tag.
No problem. Thanks for fixing the bug I introduced! :)
- Feng
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-24 20:44 ` Bradley Morgan
@ 2026-06-25 6:25 ` Andy Shevchenko
0 siblings, 0 replies; 22+ messages in thread
From: Andy Shevchenko @ 2026-06-25 6:25 UTC (permalink / raw)
To: Bradley Morgan
Cc: Andrew Morton, Petr Mladek, Feng Tang, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Mukesh Kumar Chaurasiya, Jinchao Wang, Kees Cook, Rio,
Joel Granados, Pnina Feder, Petr Pavlu, Sergey Senozhatsky,
Douglas Anderson, Mayank Rungta, Tejun Heo, Zhenguo Yao,
linuxppc-dev, linux-kernel, stable
On Wed, Jun 24, 2026 at 09:44:37PM +0100, Bradley Morgan wrote:
> On June 24, 2026 9:34:19 PM GMT+01:00, Andrew Morton
> <akpm@linux-foundation.org> wrote:
> >On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net>
> >wrote:
...
> > It would be nice to have the conventional [0/N] cover letter to tell
> > readers what this is all about.
>
> I added a what I changed? I'm iffy on cover letters, if you want I'll do
> it...
FWIW, always do cover-letter when you have 2+ patches in the series.
And do not add it (there are rare exceptions, though) when it's a single patch.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
` (4 preceding siblings ...)
2026-06-24 20:34 ` Andrew Morton
@ 2026-06-25 14:03 ` Petr Mladek
2026-06-25 14:43 ` Bradley Morgan
5 siblings, 1 reply; 22+ messages in thread
From: Petr Mladek @ 2026-06-25 14:03 UTC (permalink / raw)
To: Bradley Morgan
Cc: Feng Tang, Andrew Morton, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On Tue 2026-06-23 15:34:58, Bradley Morgan wrote:
> Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
> Add a helper that strips that bit without turning an all_bt only mask into
> a kernel_sys_info fallback.
>
> Signed-off-by: Bradley Morgan <include@grrlz.net>
> ---
> Changes since v1:
> - New patch for the shared helper suggested by Petr.
>
> include/linux/sys_info.h | 1 +
> lib/sys_info.c | 15 +++++++++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/include/linux/sys_info.h b/include/linux/sys_info.h
> index a5bc3ea3d44b..87a841ec7b6a 100644
> --- a/include/linux/sys_info.h
> +++ b/include/linux/sys_info.h
> @@ -18,6 +18,7 @@
> #define SYS_INFO_BLOCKED_TASKS 0x00000080
>
> void sys_info(unsigned long si_mask);
> +void sys_info_without_all_bt(unsigned long si_mask);
> unsigned long sys_info_parse_param(char *str);
>
> #ifdef CONFIG_SYSCTL
> diff --git a/lib/sys_info.c b/lib/sys_info.c
> index f32a06ec9ed4..6afd4c697633 100644
> --- a/lib/sys_info.c
> +++ b/lib/sys_info.c
> @@ -164,3 +164,18 @@ void sys_info(unsigned long si_mask)
> {
> __sys_info(si_mask ? : kernel_si_mask);
> }
> +
> +void sys_info_without_all_bt(unsigned long si_mask)
> +{
> + unsigned long dump_mask = si_mask & ~SYS_INFO_ALL_BT;
> +
> + /*
> + * Do not call sys_info() when the caller context required only
> + * backtraces from all CPUs. Otherwise sys_info() would fall back
> + * to the generic kernel_si_mask.
> + */
> + if (si_mask && !dump_mask)
> + return;
> +
> + sys_info(dump_mask);
> +}
Sashiko AI pointed out that this function still migth trigger printing
duplicate backtraces when (si_mask == 0). It calls sys_info(0)
which falls back to kernel_si_mask which might have SYS_INFO_ALL_BT
bit set, see https://sashiko.dev/#/patchset/9b8c96e291696815d3c7de5d3e199298dee0279d.1782228656.git.include%40grrlz.net
=> we need to eventually disable the SYS_INFO_ALL_BT bit also
in kernel_si_mask.
I think about creating a generic API which would allow to apply
a filter mask, something like:
From 02fc810a801adc0fc4d1fd14318415719bdfc656 Mon Sep 17 00:00:00 2001
From: Bradley Morgan <include@grrlz.net>
Date: Tue, 23 Jun 2026 15:34:58 +0000
Subject: [PATCH 1/4] sys_info: add helper for callers that print some
sys_info on their own
Some callers print some sys_info on their own before calling sys_info().
Add a helper which would allow to prevent a duplicated output.
It is a bit tricky because kernel_si_mask should be used only
when the call-specific si_mask is empty. But the duplicated
output must be prevented there as well.
Signed-off-by: Bradley Morgan <include@grrlz.net>
Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup") ?
Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup")
---
include/linux/sys_info.h | 1 +
lib/sys_info.c | 20 ++++++++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/include/linux/sys_info.h b/include/linux/sys_info.h
index a5bc3ea3d44b..f1c2552ca3d1 100644
--- a/include/linux/sys_info.h
+++ b/include/linux/sys_info.h
@@ -18,6 +18,7 @@
#define SYS_INFO_BLOCKED_TASKS 0x00000080
void sys_info(unsigned long si_mask);
+void sys_info_with_filter(unsigned long si_mask, unsigned long si_ignore_mask);
unsigned long sys_info_parse_param(char *str);
#ifdef CONFIG_SYSCTL
diff --git a/lib/sys_info.c b/lib/sys_info.c
index f32a06ec9ed4..d411fee10415 100644
--- a/lib/sys_info.c
+++ b/lib/sys_info.c
@@ -136,8 +136,10 @@ static int __init sys_info_sysctl_init(void)
subsys_initcall(sys_info_sysctl_init);
#endif
-static void __sys_info(unsigned long si_mask)
+static void __sys_info(unsigned long si_mask, unsigned long si_ignore_mask)
{
+ si_mask &= ~si_ignore_mask;
+
if (si_mask & SYS_INFO_TASKS)
show_state();
@@ -160,7 +162,21 @@ static void __sys_info(unsigned long si_mask)
show_state_filter(TASK_UNINTERRUPTIBLE);
}
+void sys_info_with_filter(unsigned long si_mask, unsigned long si_ignore_mask)
+{
+ unsigned long dump_mask = si_mask & ~si_ignore_mask;
+
+ /*
+ * Do not fall back to kernel_si_mask when the caller context
+ * required only the ignored information.
+ */
+ if (si_mask && !dump_mask)
+ return;
+
+ __sys_info(dump_mask ? : kernel_si_mask, si_ignore_mask);
+}
+
void sys_info(unsigned long si_mask)
{
- __sys_info(si_mask ? : kernel_si_mask);
+ sys_info_with_filter(si_mask, 0);
}
The next patches might use sys_info_with_filter(si_mask,
SYS_INFO_ALL_BT) instead of sys_info_without_all_bt(si_mask).
Feel free to bike shed about the function name. Also I am not
sure whether to pass the filter as bits to filter or already
the complement (~mask).
Best Regards,
Petr
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 14:03 ` Petr Mladek
@ 2026-06-25 14:43 ` Bradley Morgan
0 siblings, 0 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-25 14:43 UTC (permalink / raw)
To: Petr Mladek
Cc: Feng Tang, Andrew Morton, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable
On June 25, 2026 3:03:48 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
wrote:
>On Tue 2026-06-23 15:34:58, Bradley Morgan wrote:
>> Some callers handle SYS_INFO_ALL_BT themselves before calling
>sys_info().
>> Add a helper that strips that bit without turning an all_bt only mask
>into
>> a kernel_sys_info fallback.
>>
>> Signed-off-by: Bradley Morgan <include@grrlz.net>
>> ---
>> Changes since v1:
>> - New patch for the shared helper suggested by Petr.
>>
>> include/linux/sys_info.h | 1 +
>> lib/sys_info.c | 15 +++++++++++++++
>> 2 files changed, 16 insertions(+)
>>
>> diff --git a/include/linux/sys_info.h b/include/linux/sys_info.h
>> index a5bc3ea3d44b..87a841ec7b6a 100644
>> --- a/include/linux/sys_info.h
>> +++ b/include/linux/sys_info.h
>> @@ -18,6 +18,7 @@
>> #define SYS_INFO_BLOCKED_TASKS 0x00000080
>>
>> void sys_info(unsigned long si_mask);
>> +void sys_info_without_all_bt(unsigned long si_mask);
>> unsigned long sys_info_parse_param(char *str);
>>
>> #ifdef CONFIG_SYSCTL
>> diff --git a/lib/sys_info.c b/lib/sys_info.c
>> index f32a06ec9ed4..6afd4c697633 100644
>> --- a/lib/sys_info.c
>> +++ b/lib/sys_info.c
>> @@ -164,3 +164,18 @@ void sys_info(unsigned long si_mask)
>> {
>> __sys_info(si_mask ? : kernel_si_mask);
>> }
>> +
>> +void sys_info_without_all_bt(unsigned long si_mask)
>> +{
>> + unsigned long dump_mask = si_mask & ~SYS_INFO_ALL_BT;
>> +
>> + /*
>> + * Do not call sys_info() when the caller context required only
>> + * backtraces from all CPUs. Otherwise sys_info() would fall back
>> + * to the generic kernel_si_mask.
>> + */
>> + if (si_mask && !dump_mask)
>> + return;
>> +
>> + sys_info(dump_mask);
>> +}
>
>Sashiko AI pointed out that this function still migth trigger printing
>duplicate backtraces when (si_mask == 0). It calls sys_info(0)
>which falls back to kernel_si_mask which might have SYS_INFO_ALL_BT
>bit set, see
>https://sashiko.dev/#/patchset/9b8c96e291696815d3c7de5d3e199298dee0279d.1782228656.git.include%40grrlz.net
>
>=> we need to eventually disable the SYS_INFO_ALL_BT bit also
> in kernel_si_mask.
>
>I think about creating a generic API which would allow to apply
>a filter mask, something like:
>
>From 02fc810a801adc0fc4d1fd14318415719bdfc656 Mon Sep 17 00:00:00 2001
>From: Bradley Morgan <include@grrlz.net>
>Date: Tue, 23 Jun 2026 15:34:58 +0000
>Subject: [PATCH 1/4] sys_info: add helper for callers that print some
>sys_info on their own
>
>Some callers print some sys_info on their own before calling sys_info().
>Add a helper which would allow to prevent a duplicated output.
>
>It is a bit tricky because kernel_si_mask should be used only
>when the call-specific si_mask is empty. But the duplicated
>output must be prevented there as well.
>
>Signed-off-by: Bradley Morgan <include@grrlz.net>
>Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup") ?
>Fixes: a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on system lockup")
>---
> include/linux/sys_info.h | 1 +
> lib/sys_info.c | 20 ++++++++++++++++++--
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
>diff --git a/include/linux/sys_info.h b/include/linux/sys_info.h
>index a5bc3ea3d44b..f1c2552ca3d1 100644
>--- a/include/linux/sys_info.h
>+++ b/include/linux/sys_info.h
>@@ -18,6 +18,7 @@
> #define SYS_INFO_BLOCKED_TASKS 0x00000080
>
> void sys_info(unsigned long si_mask);
>+void sys_info_with_filter(unsigned long si_mask, unsigned long si_ignore_mask);
> unsigned long sys_info_parse_param(char *str);
>
> #ifdef CONFIG_SYSCTL
>diff --git a/lib/sys_info.c b/lib/sys_info.c
>index f32a06ec9ed4..d411fee10415 100644
>--- a/lib/sys_info.c
>+++ b/lib/sys_info.c
>@@ -136,8 +136,10 @@ static int __init sys_info_sysctl_init(void)
> subsys_initcall(sys_info_sysctl_init);
> #endif
>
>-static void __sys_info(unsigned long si_mask)
>+static void __sys_info(unsigned long si_mask, unsigned long si_ignore_mask)
> {
>+ si_mask &= ~si_ignore_mask;
>+
> if (si_mask & SYS_INFO_TASKS)
> show_state();
>
>@@ -160,7 +162,21 @@ static void __sys_info(unsigned long si_mask)
> show_state_filter(TASK_UNINTERRUPTIBLE);
> }
>
>+void sys_info_with_filter(unsigned long si_mask, unsigned long si_ignore_mask)
>+{
>+ unsigned long dump_mask = si_mask & ~si_ignore_mask;
>+
>+ /*
>+ * Do not fall back to kernel_si_mask when the caller context
>+ * required only the ignored information.
>+ */
>+ if (si_mask && !dump_mask)
>+ return;
>+
>+ __sys_info(dump_mask ? : kernel_si_mask, si_ignore_mask);
>+}
>+
> void sys_info(unsigned long si_mask)
> {
>- __sys_info(si_mask ? : kernel_si_mask);
>+ sys_info_with_filter(si_mask, 0);
> }
>
>The next patches might use sys_info_with_filter(si_mask,
>SYS_INFO_ALL_BT) instead of sys_info_without_all_bt(si_mask).
>
>Feel free to bike shed about the function name. Also I am not
>sure whether to pass the filter as bits to filter or already
>the complement (~mask).
>
>Best Regards,
>Petr
>
>
Okay petr, so, The whole V3 situation..
I have to
- Add (or modify) your suggestion
- Add fengs reviewed by tag
- and find a more neutral fixes tag
- And also add Cc stable to patch 1
Ill work on V4 today.
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-24 20:34 ` Andrew Morton
2026-06-24 20:44 ` Bradley Morgan
@ 2026-06-25 15:30 ` Petr Mladek
2026-06-25 15:31 ` Bradley Morgan
2026-06-25 18:38 ` Andrew Morton
1 sibling, 2 replies; 22+ messages in thread
From: Petr Mladek @ 2026-06-25 15:30 UTC (permalink / raw)
To: Andrew Morton
Cc: Bradley Morgan, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable, Michal Hocko, Miroslav Benes, Jiri Kosina
On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
> On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net> wrote:
>
> > Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
> > Add a helper that strips that bit without turning an all_bt only mask into
> > a kernel_sys_info fallback.
>
> I assume this patch wants a Fixes: and a cc:stable also.
>
> It would be nice to have the conventional [0/N] cover letter to tell
> readers what this is all about.
>
> The patches all have different Fixes: targets. This risks inviting the
> -stable maintainers to merge only some of the patches into some
> kernels, resulting in an untested combination and which might break
> things.
I do not agree here. The Fixes tag should should point to a commit
which introduced the regression into the given code. And finding
some magic common point beause there is some magic undocumented
process for maintaining stable kernels sounds like a way to hell
to me.
Best Regards,
Petr
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 15:30 ` Fixed tag magic: was: " Petr Mladek
@ 2026-06-25 15:31 ` Bradley Morgan
2026-06-25 15:42 ` Petr Mladek
2026-06-25 18:38 ` Andrew Morton
1 sibling, 1 reply; 22+ messages in thread
From: Bradley Morgan @ 2026-06-25 15:31 UTC (permalink / raw)
To: Petr Mladek, Andrew Morton
Cc: Feng Tang, Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Mukesh Kumar Chaurasiya, Andy Shevchenko,
Jinchao Wang, Kees Cook, Rio, Joel Granados, Pnina Feder,
Petr Pavlu, Sergey Senozhatsky, Douglas Anderson, Mayank Rungta,
Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel, stable,
Michal Hocko, Miroslav Benes, Jiri Kosina
On June 25, 2026 4:30:15 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
wrote:
>On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
>> On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net>
>wrote:
>>
>> > Some callers handle SYS_INFO_ALL_BT themselves before calling
>sys_info().
>> > Add a helper that strips that bit without turning an all_bt only mask
>into
>> > a kernel_sys_info fallback.
>>
>> I assume this patch wants a Fixes: and a cc:stable also.
>>
>> It would be nice to have the conventional [0/N] cover letter to tell
>> readers what this is all about.
>>
>> The patches all have different Fixes: targets. This risks inviting the
>> -stable maintainers to merge only some of the patches into some
>> kernels, resulting in an untested combination and which might break
>> things.
>
>I do not agree here. The Fixes tag should should point to a commit
>which introduced the regression into the given code. And finding
>some magic common point beause there is some magic undocumented
>process for maintaining stable kernels sounds like a way to hell
>to me.
>
>Best Regards,
>Petr
oh no.
I added the generic tag to V4, no worries, it is the earliest possible
fixes tag. But I really don't wanna be doing a V5 just to revert my
fixes tags.
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 15:31 ` Bradley Morgan
@ 2026-06-25 15:42 ` Petr Mladek
2026-06-25 15:46 ` Bradley Morgan
0 siblings, 1 reply; 22+ messages in thread
From: Petr Mladek @ 2026-06-25 15:42 UTC (permalink / raw)
To: Bradley Morgan
Cc: Andrew Morton, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable, Michal Hocko, Miroslav Benes, Jiri Kosina
On Thu 2026-06-25 16:31:47, Bradley Morgan wrote:
> On June 25, 2026 4:30:15 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
> wrote:
> >On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
> >> On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net>
> >wrote:
> >>
> >> > Some callers handle SYS_INFO_ALL_BT themselves before calling
> >sys_info().
> >> > Add a helper that strips that bit without turning an all_bt only mask
> >into
> >> > a kernel_sys_info fallback.
> >>
> >> I assume this patch wants a Fixes: and a cc:stable also.
> >>
> >> It would be nice to have the conventional [0/N] cover letter to tell
> >> readers what this is all about.
> >>
> >> The patches all have different Fixes: targets. This risks inviting the
> >> -stable maintainers to merge only some of the patches into some
> >> kernels, resulting in an untested combination and which might break
> >> things.
> >
> >I do not agree here. The Fixes tag should should point to a commit
> >which introduced the regression into the given code. And finding
> >some magic common point beause there is some magic undocumented
> >process for maintaining stable kernels sounds like a way to hell
> >to me.
> >
> >Best Regards,
> >Petr
>
>
> oh no.
> I added the generic tag to V4, no worries, it is the earliest possible
> fixes tag. But I really don't wanna be doing a V5 just to revert my
> fixes tags.
This is the risk when sending 4 versions of a fix within 5 days.
A good practice is to wait at least one week before sending another
version. It gives people chance to react and helps the discussion
to settle.
That said, I am not going to block this because of the fixes tags.
But I suggest to wait longer next time.
Best Regards,
Petr
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 15:42 ` Petr Mladek
@ 2026-06-25 15:46 ` Bradley Morgan
2026-06-25 15:48 ` Bradley Morgan
0 siblings, 1 reply; 22+ messages in thread
From: Bradley Morgan @ 2026-06-25 15:46 UTC (permalink / raw)
To: Petr Mladek
Cc: Andrew Morton, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable, Michal Hocko, Miroslav Benes, Jiri Kosina
On June 25, 2026 4:42:44 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
wrote:
>On Thu 2026-06-25 16:31:47, Bradley Morgan wrote:
>> On June 25, 2026 4:30:15 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
>> wrote:
>> >On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
>> >> On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net>
>> >wrote:
>> >>
>> >> > Some callers handle SYS_INFO_ALL_BT themselves before calling
>> >sys_info().
>> >> > Add a helper that strips that bit without turning an all_bt only
>mask
>> >into
>> >> > a kernel_sys_info fallback.
>> >>
>> >> I assume this patch wants a Fixes: and a cc:stable also.
>> >>
>> >> It would be nice to have the conventional [0/N] cover letter to tell
>> >> readers what this is all about.
>> >>
>> >> The patches all have different Fixes: targets. This risks inviting
>the
>> >> -stable maintainers to merge only some of the patches into some
>> >> kernels, resulting in an untested combination and which might break
>> >> things.
>> >
>> >I do not agree here. The Fixes tag should should point to a commit
>> >which introduced the regression into the given code. And finding
>> >some magic common point beause there is some magic undocumented
>> >process for maintaining stable kernels sounds like a way to hell
>> >to me.
>> >
>> >Best Regards,
>> >Petr
>>
>>
>> oh no.
>> I added the generic tag to V4, no worries, it is the earliest possible
>> fixes tag. But I really don't wanna be doing a V5 just to revert my
>> fixes tags.
>
>This is the risk when sending 4 versions of a fix within 5 days.
>A good practice is to wait at least one week before sending another
>version. It gives people chance to react and helps the discussion
>to settle.
>
>That said, I am not going to block this because of the fixes tags.
>But I suggest to wait longer next time.
>
>Best Regards,
>Petr
>
The whole fixes tag thing is unfortunate.
because it should be Fixes: then whatever commit ADDS the regression.
Not a common fixes tag for all!
Maybe when it's merged, Andrew or someone else could do
Cc: stable@vger.kernel.org [5.10] for instance, for it to be backported to that version.
That should fix the whole fiasco
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 15:46 ` Bradley Morgan
@ 2026-06-25 15:48 ` Bradley Morgan
0 siblings, 0 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-25 15:48 UTC (permalink / raw)
To: Petr Mladek
Cc: Andrew Morton, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable, Michal Hocko, Miroslav Benes, Jiri Kosina
On June 25, 2026 4:46:11 PM GMT+01:00, Bradley Morgan <include@grrlz.net>
wrote:
>On June 25, 2026 4:42:44 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
>wrote:
>>On Thu 2026-06-25 16:31:47, Bradley Morgan wrote:
>>> On June 25, 2026 4:30:15 PM GMT+01:00, Petr Mladek <pmladek@suse.com>
>>> wrote:
>>> >On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
>>> >> On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan
><include@grrlz.net>
>>> >wrote:
>>> >>
>>> >> > Some callers handle SYS_INFO_ALL_BT themselves before calling
>>> >sys_info().
>>> >> > Add a helper that strips that bit without turning an all_bt only
>>mask
>>> >into
>>> >> > a kernel_sys_info fallback.
>>> >>
>>> >> I assume this patch wants a Fixes: and a cc:stable also.
>>> >>
>>> >> It would be nice to have the conventional [0/N] cover letter to tell
>>> >> readers what this is all about.
>>> >>
>>> >> The patches all have different Fixes: targets. This risks inviting
>>the
>>> >> -stable maintainers to merge only some of the patches into some
>>> >> kernels, resulting in an untested combination and which might break
>>> >> things.
>>> >
>>> >I do not agree here. The Fixes tag should should point to a commit
>>> >which introduced the regression into the given code. And finding
>>> >some magic common point beause there is some magic undocumented
>>> >process for maintaining stable kernels sounds like a way to hell
>>> >to me.
>>> >
>>> >Best Regards,
>>> >Petr
>>>
>>>
>>> oh no.
>>> I added the generic tag to V4, no worries, it is the earliest possible
>>> fixes tag. But I really don't wanna be doing a V5 just to revert my
>>> fixes tags.
>>
>>This is the risk when sending 4 versions of a fix within 5 days.
Oops, I was wrong, 3 versions.
>>A good practice is to wait at least one week before sending another
>>version. It gives people chance to react and helps the discussion
>>to settle.
>>
>>That said, I am not going to block this because of the fixes tags.
>>But I suggest to wait longer next time.
>>
>>Best Regards,
>>Petr
>>
>
>The whole fixes tag thing is unfortunate.
>
>because it should be Fixes: then whatever commit ADDS the regression.
>
>Not a common fixes tag for all!
>
>Maybe when it's merged, Andrew or someone else could do
>
>
>Cc: stable@vger.kernel.org [5.10] for instance, for it to be backported to that version.
>
>That should fix the whole fiasco
>
>Thanks!
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 15:30 ` Fixed tag magic: was: " Petr Mladek
2026-06-25 15:31 ` Bradley Morgan
@ 2026-06-25 18:38 ` Andrew Morton
2026-06-25 21:00 ` Bradley Morgan
1 sibling, 1 reply; 22+ messages in thread
From: Andrew Morton @ 2026-06-25 18:38 UTC (permalink / raw)
To: Petr Mladek
Cc: Bradley Morgan, Feng Tang, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Mukesh Kumar Chaurasiya,
Andy Shevchenko, Jinchao Wang, Kees Cook, Rio, Joel Granados,
Pnina Feder, Petr Pavlu, Sergey Senozhatsky, Douglas Anderson,
Mayank Rungta, Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel,
stable, Michal Hocko, Miroslav Benes, Jiri Kosina
On Thu, 25 Jun 2026 17:30:15 +0200 Petr Mladek <pmladek@suse.com> wrote:
> On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
> > On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net> wrote:
> >
> > > Some callers handle SYS_INFO_ALL_BT themselves before calling sys_info().
> > > Add a helper that strips that bit without turning an all_bt only mask into
> > > a kernel_sys_info fallback.
> >
> > I assume this patch wants a Fixes: and a cc:stable also.
> >
> > It would be nice to have the conventional [0/N] cover letter to tell
> > readers what this is all about.
> >
> > The patches all have different Fixes: targets. This risks inviting the
> > -stable maintainers to merge only some of the patches into some
> > kernels, resulting in an untested combination and which might break
> > things.
>
> I do not agree here. The Fixes tag should should point to a commit
> which introduced the regression into the given code. And finding
> some magic common point beause there is some magic undocumented
> process for maintaining stable kernels sounds like a way to hell
> to me.
Well, as said, this potentially asks -stable maintainers to cherrypick
individual patches from this series into various kernel versions.
Potentially resulting in code combinations which nobody has tested.
Heck, the individual patches may not even compile.
If we're to add the series to mainline as a single atomic lump then we
should add it to -stable as a single atomic lump, as that's the only
thing which has been tested. To communicate this to -stable
maintainers we can choose a Fixes: target to which the series can be
added as a single atomic lump.
Of course, we could always discuss this with -stable maintainers ;)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fixed tag magic: was: Re: [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt
2026-06-25 18:38 ` Andrew Morton
@ 2026-06-25 21:00 ` Bradley Morgan
0 siblings, 0 replies; 22+ messages in thread
From: Bradley Morgan @ 2026-06-25 21:00 UTC (permalink / raw)
To: Andrew Morton, Petr Mladek
Cc: Feng Tang, Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Mukesh Kumar Chaurasiya, Andy Shevchenko,
Jinchao Wang, Kees Cook, Rio, Joel Granados, Pnina Feder,
Petr Pavlu, Sergey Senozhatsky, Douglas Anderson, Mayank Rungta,
Tejun Heo, Zhenguo Yao, linuxppc-dev, linux-kernel, stable,
Michal Hocko, Miroslav Benes, Jiri Kosina
On 25 June 2026 19:38:14 BST, Andrew Morton <akpm@linux-foundation.org>
wrote:
>On Thu, 25 Jun 2026 17:30:15 +0200 Petr Mladek <pmladek@suse.com> wrote:
>
>> On Wed 2026-06-24 13:34:19, Andrew Morton wrote:
>> > On Tue, 23 Jun 2026 15:34:58 +0000 Bradley Morgan <include@grrlz.net>
>wrote:
>> >
>> > > Some callers handle SYS_INFO_ALL_BT themselves before calling
>sys_info().
>> > > Add a helper that strips that bit without turning an all_bt only
>mask into
>> > > a kernel_sys_info fallback.
>> >
>> > I assume this patch wants a Fixes: and a cc:stable also.
>> >
>> > It would be nice to have the conventional [0/N] cover letter to tell
>> > readers what this is all about.
>> >
>> > The patches all have different Fixes: targets. This risks inviting
>the
>> > -stable maintainers to merge only some of the patches into some
>> > kernels, resulting in an untested combination and which might break
>> > things.
>>
>> I do not agree here. The Fixes tag should should point to a commit
>> which introduced the regression into the given code. And finding
>> some magic common point beause there is some magic undocumented
>> process for maintaining stable kernels sounds like a way to hell
>> to me.
>
>Well, as said, this potentially asks -stable maintainers to cherrypick
>individual patches from this series into various kernel versions.
>Potentially resulting in code combinations which nobody has tested.
>Heck, the individual patches may not even compile.
>
>If we're to add the series to mainline as a single atomic lump then we
>should add it to -stable as a single atomic lump, as that's the only
>thing which has been tested. To communicate this to -stable
>maintainers we can choose a Fixes: target to which the series can be
>added as a single atomic lump.
>
>Of course, we could always discuss this with -stable maintainers ;)
>
Hi Andrew, I ended up deciding on a generic fixes tag on V3, if you
would like to have a look.
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2026-06-25 21:00 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 15:34 [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Bradley Morgan
2026-06-23 15:34 ` [PATCH v2 2/4] watchdog: avoid sys_info fallback for all_bt Bradley Morgan
2026-06-23 15:35 ` [PATCH v2 3/4] powerpc/watchdog: " Bradley Morgan
2026-06-23 15:35 ` [PATCH v2 4/4] panic: avoid duplicate all CPU backtraces from sys_info Bradley Morgan
2026-06-24 2:50 ` Feng Tang
2026-06-24 16:12 ` Bradley Morgan
2026-06-25 3:33 ` Feng Tang
2026-06-23 20:11 ` [PATCH v2 1/4] sys_info: add helper for callers that handle all_bt Andy Shevchenko
2026-06-23 20:14 ` Andy Shevchenko
2026-06-23 20:16 ` Bradley Morgan
2026-06-24 20:34 ` Andrew Morton
2026-06-24 20:44 ` Bradley Morgan
2026-06-25 6:25 ` Andy Shevchenko
2026-06-25 15:30 ` Fixed tag magic: was: " Petr Mladek
2026-06-25 15:31 ` Bradley Morgan
2026-06-25 15:42 ` Petr Mladek
2026-06-25 15:46 ` Bradley Morgan
2026-06-25 15:48 ` Bradley Morgan
2026-06-25 18:38 ` Andrew Morton
2026-06-25 21:00 ` Bradley Morgan
2026-06-25 14:03 ` Petr Mladek
2026-06-25 14:43 ` Bradley Morgan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.