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:   Mon, 18 Jan 2021 11:16:41 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Paul Thomas <pthomas8589@...il.com>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        linux-watchdog@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Michal Simek <michal.simek@...inx.com>
Subject: Re: watchdog: watchdog_stop_on_reboot()

On 1/18/21 9:39 AM, Paul Thomas wrote:
> Hello,
> 
> I'm going through our out-of-tree commits, and was wondering if there
> is anything to be done with this one. Basically we remove both
> watchdog_stop_on_reboot() calls (not sure why there are two to begin
> with):

Those were there from the beginning, only hand coded. One was implemented
using a shutdown notifier, one as shutdown callback. Over time both were
converted to use the watchdog API, without me or anyone else noticing
that the second call is redundant.

> --- a/drivers/watchdog/cadence_wdt.c
> +++ b/drivers/watchdog/cadence_wdt.c
> @@ -330,7 +330,6 @@ static int cdns_wdt_probe(struct platform_device *pdev)
> 
>         watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev);
>         watchdog_set_nowayout(cdns_wdt_device, nowayout);
> -       watchdog_stop_on_reboot(cdns_wdt_device);
>         watchdog_set_drvdata(cdns_wdt_device, wdt);
> 
>         wdt->clk = devm_clk_get(dev, NULL);
> @@ -359,7 +358,6 @@ static int cdns_wdt_probe(struct platform_device *pdev)
> 
>         spin_lock_init(&wdt->io_lock);
> 
> -       watchdog_stop_on_reboot(cdns_wdt_device);
>         watchdog_stop_on_unregister(cdns_wdt_device);
>         ret = devm_watchdog_register_device(dev, cdns_wdt_device);
>         if (ret)
> 
> This seems to save us in certain conditions where the Software System
> Reset fails[1]. I'm not sure if there's other use cases where you
> really do want the watchdog to stop on reboot?
> 

Good question. Unfortunately I don't have an answer. I am fine with removing both.

Guenter

> This is on an arm64 Zyny Ultrascale+ platform.
> 
> -Paul
> 
> [1] The one reproducible example of the Software System Reset failing
> I have for our system is after a kernel oops from removing the
> xilinx_dma module.
> https://lore.kernel.org/lkml/CAD56B7d_9+0XuOBysxW=CADLTG_7RybBTM8hCYKSigB8ie8E_g@mail.gmail.com/
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ