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: <CAPaOXESgeK9oJB_0fRVqZQFQWQKJ=Y-L7TAX2oBkLR4cv3Z7bQ@mail.gmail.com>
Date:   Fri, 16 Oct 2020 21:25:40 +0800
From:   Joseph Jang <josephjang@...gle.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Jonglin Lee <jonglin@...gle.com>,
        Woody Lin <woodylin@...gle.com>,
        Mark Cheng <markcheng@...gle.com>
Subject: Re: [PATCH] power: suspend: Add suspend timeout handler

Yes, I agree.

Rafael J. Wysocki <rafael@...nel.org> 於 2020年10月16日 週五 下午9:24寫道:
>
> On Fri, Oct 16, 2020 at 3:22 PM <josephjang@...gle.com> wrote:
> >
> > Thank you Rafael's promptly response.
> >
> > > On Fri, Oct 16, 2020 at 5:51 AM Joseph Jang <josephjang@...gle.com> wrote:
> > > >
> > > > From: josephjang <josephjang@...gle.com>
> > > >
> > > > Add suspend timeout handler to prevent device stuck during suspend/
> > > > resume process. Suspend timeout handler will dump disk sleep task
> > > > at first round timeout and trigger kernel panic at second round timeout.
> > > > The default timer for each round is 30 seconds.
> > > >
> > > > Note: Can use following command to simulate suspend hang for testing.
> > > >     adb shell echo 1 > /sys/power/pm_hang
> > > >     adb shell echo mem > /sys/power/state
> > > > Signed-off-by: josephjang <josephjang@...gle.com>
> > > > ---
> > > >  include/linux/console.h |   1 +
> > > >  kernel/power/Kconfig    |   9 +++
> > > >  kernel/power/main.c     |  66 ++++++++++++++++
> > > >  kernel/power/suspend.c  | 162 ++++++++++++++++++++++++++++++++++++++++
> > > >  kernel/printk/printk.c  |   5 ++
> > > >  5 files changed, 243 insertions(+)
> > > >
> > > > diff --git a/include/linux/console.h b/include/linux/console.h
> > > > index 0670d3491e0e..ac468c602c0b 100644
> > > > --- a/include/linux/console.h
> > > > +++ b/include/linux/console.h
> > > > @@ -192,6 +192,7 @@ static inline void console_sysfs_notify(void)
> > > >  { }
> > > >  #endif
> > > >  extern bool console_suspend_enabled;
> > > > +extern int is_console_suspended(void);
> > > >
> > > >  /* Suspend and resume console messages over PM events */
> > > >  extern void suspend_console(void);
> > > > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > > > index a7320f07689d..52b7a181b6d8 100644
> > > > --- a/kernel/power/Kconfig
> > > > +++ b/kernel/power/Kconfig
> > > > @@ -207,6 +207,15 @@ config PM_SLEEP_DEBUG
> > > >         def_bool y
> > > >         depends on PM_DEBUG && PM_SLEEP
> > > >
> > > > +config PM_SLEEP_MONITOR
> > > > +       bool "Linux kernel suspend/resume process monitor"
> > > > +       depends on PM_SLEEP
> > > > +       help
> > > > +       This option will enable suspend/resume monitor to prevent device
> > > > +       stuck during suspend/resume process. Suspend timeout handler
> > > will
> > > > +       dump disk sleep task at first round timeout and trigger kernel
> > > panic
> > > > +       at second round timeout. The default timer for each round is 30
> > > seconds.
> > > > +
> >
> > > The facility associated with the Kconfig entry right below is supposed
> > > to do exactly the same thing.
> >
> > > What's the reason to add another one?  What is missing?
> >
> >
> >
> > > >  config DPM_WATCHDOG
> > > >         bool "Device suspend/resume watchdog"
> > > >         depends on PM_DEBUG && PSTORE && EXPERT
> >
> > Because we found some suspend hand issue that cannot be detected by
> > "CONFIG_DPM_WATCHDOG" (which is focus on device PM).
>
> What's that issue?
>
> > Our suspend timeout monitor can cover PM core and Device PM hang issues.
>
> Then I'd suggest to extend the existing watchdog instead of adding a
> whole new implementation.



-- 
Embedded Software engineer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ