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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 09 Sep 2014 12:45:44 +0200
From:	Janusz Użycki <j.uzycki@...roma.com.pl>
To:	Lisovy Rostislav <lisovy@...il.com>,
	linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
CC:	Michal Vokac <michal.vokac@...ap.cz>
Subject: Re: Watchdog start during boot

Hello.

Please join to the watchdog_dev thread: 
http://www.spinics.net/lists/linux-watchdog/msg05004.html.

best regards
Janusz

W dniu 2014-09-09 12:29, Lisovy Rostislav pisze:
> Hello;
> If my understanding is correct, the purpose of the "watchdog subsystem"
> is to provide an unified interface from user-space to watchdog devices
> (via /dev). The issue I am trying to solve is how to start the watchdog
> during boot (it would be sufficient just not to disable it since the
> bootloader enables it) to be controlled later on with the user-space
> tool -- i.e. when the user-space will not boot properly, I would like
> the device to be rebooted.
>
> My "quick and dirty" device-specific solution is:
>
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index 3691b15..1e44b03f 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -53,6 +53,10 @@ static unsigned timer_margin;
>   module_param(timer_margin, uint, 0);
>   MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)");
>   
> +static bool start_on_boot = false;
> +module_param(start_on_boot, bool, 0);
> +MODULE_PARM_DESC(start_on_boot, "Start the watchdog during boot");
> +
>   struct omap_wdt_dev {
>          void __iomem    *base;          /* physical */
>          struct device   *dev;
> @@ -269,6 +273,9 @@ static int omap_wdt_probe(struct platform_device *pdev)
>   
>          pm_runtime_put_sync(wdev->dev);
>   
> +       if (start_on_boot)
> +               omap_wdt_start(omap_wdt);
> +
>          return 0;
>   }
>
> however I think it would be much beneficial to do this in a generic way.
> Maybe to create a device tree property, that would store some flag to
> start the watchdog during boot?
>
> Your opinion is appreciated.
>   
> Best regards;
> Rostislav Lisovy
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ