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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hzSowdZBC2_SV79BUgPMZSRM9ObD8wyssgMFw9A9LHTA@mail.gmail.com>
Date: Mon, 20 Oct 2025 20:08:38 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Tomasz Figa <tfiga@...omium.org>, Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Pavel Machek <pavel@...nel.org>, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2] PM: dpm: add module param to backtrace all CPUs

On Tue, Oct 7, 2025 at 9:51 AM Tomasz Figa <tfiga@...omium.org> wrote:
>
> On Tue, Oct 7, 2025 at 3:36 PM Sergey Senozhatsky
> <senozhatsky@...omium.org> wrote:
> >
> > Add dpm_watchdog_all_cpu_backtrace module parameter which
> > controls all CPU backtrace dump before DPM panics the system.
> > This is expected to help understanding what might have caused
> > device timeout.
> >
> > Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
> > ---
> >  drivers/base/power/main.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > index e83503bdc1fd..7a8807ec9a5d 100644
> > --- a/drivers/base/power/main.c
> > +++ b/drivers/base/power/main.c
> > @@ -34,6 +34,7 @@
> >  #include <linux/cpufreq.h>
> >  #include <linux/devfreq.h>
> >  #include <linux/timer.h>
> > +#include <linux/nmi.h>
> >
> >  #include "../base.h"
> >  #include "power.h"
> > @@ -515,6 +516,11 @@ struct dpm_watchdog {
> >  #define DECLARE_DPM_WATCHDOG_ON_STACK(wd) \
> >         struct dpm_watchdog wd
> >
> > +static bool __read_mostly dpm_watchdog_all_cpu_backtrace;
> > +module_param(dpm_watchdog_all_cpu_backtrace, bool, 0644);
> > +MODULE_PARM_DESC(dpm_watchdog_all_cpu_backtrace,
> > +                "Backtrace all CPUs on DPM watchdog timeout");
> > +
> >  /**
> >   * dpm_watchdog_handler - Driver suspend / resume watchdog handler.
> >   * @t: The timer that PM watchdog depends on.
> > @@ -530,8 +536,12 @@ static void dpm_watchdog_handler(struct timer_list *t)
> >         unsigned int time_left;
> >
> >         if (wd->fatal) {
> > +               unsigned int this_cpu = smp_processor_id();
> > +
> >                 dev_emerg(wd->dev, "**** DPM device timeout ****\n");
> >                 show_stack(wd->tsk, NULL, KERN_EMERG);
> > +               if (dpm_watchdog_all_cpu_backtrace)
> > +                       trigger_allbutcpu_cpu_backtrace(this_cpu);
> >                 panic("%s %s: unrecoverable failure\n",
> >                         dev_driver_string(wd->dev), dev_name(wd->dev));
> >         }
> > --
> > 2.51.0.618.g983fd99d29-goog
> >
>
> Reviewed-by: Tomasz Figa <tfiga@...omium.org>

Applied as 6.19 material with some edits in the subject and changelog, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ