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]
Date:   Thu, 13 May 2021 03:49:23 +0000
From:   Robin Gong <yibin.gong@....com>
To:     Guenter Roeck <linux@...ck-us.net>
CC:     "wim@...ux-watchdog.org" <wim@...ux-watchdog.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v1] watchdog: imx2_wdt: clear WDOG_HW_RUNNING before
 suspend

On 5/12/21 22:15 Guenter Roeck <groeck7@...il.com> wrote:
> We can not assume that the situation is exactly the same for all drivers and
> use a core flag to indicate some driver specific state just to avoid a
> driver-internal flag.
> 
> Either case, it looks like you are saying that the watchdog can be stopped after
> all, by disabling its clock.
> 
> > BTW, for i.mx2_wdt which watchdog can't be stop unless kernel enter
> > into suspend, that seems like watchdog stop after suspend and clear
> > WDOG_HW_RUNNING makes sense?
> >
> 
> Yes, if you make it official and add a stop function which disables the
> watchdog by stopping its clock. Then the driver should not set
> WDOG_HW_RUNNING in the first place, and use the normal mechanisms to
> start and stop the watchdog.
> That would include starting the clock in the start function, and stopping it in
> the stop function.
> 
Sorry, watchdog can't be stopped by disabling clock. The only way to stop watchdog
is SOC enter Deep Sleep Mode(suspend) and stopped by HW,  so the suspend flow
looks like 'watchdog stop' which I though WDOG_HW_RUNNING makes sense. 
Okay, I will use internal flag instead of WDOG_HW_RUNNING in v2, thanks.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ