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-next>] [day] [month] [year] [list]
Date:   Fri, 11 Feb 2022 18:10:33 -0800
From:   Eduardo Valentin <eduval@...zon.com>
To:     <eduval@...zon.com>, Wim Van Sebroeck <wim@...ux-watchdog.org>,
        "Guenter Roeck" <linux@...ck-us.net>
CC:     Joel Stanley <joel@....id.au>, Andrew Jeffery <andrew@...id.au>,
        <linux-watchdog@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-aspeed@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
        "Eduardo Valentin" <evalenti@...nel.org>
Subject: [PATCH 1/1] watchdog: aspeed: add nowayout support

Add support for not stopping the watchdog
when the userspace application quits. At
closing of the device, the driver cannot
determine if this was a graceful closure
or if the app crashed. If the support
of nowayout on this driver, the system integrator
can select the behaviour by setting the kernel
config and enabling it.

Cc: Wim Van Sebroeck <wim@...ux-watchdog.org> (maintainer:WATCHDOG DEVICE DRIVERS)
Cc: Guenter Roeck <linux@...ck-us.net> (maintainer:WATCHDOG DEVICE DRIVERS)
Cc: Joel Stanley <joel@....id.au> (supporter:ARM/ASPEED MACHINE SUPPORT)
Cc: Andrew Jeffery <andrew@...id.au> (reviewer:ARM/ASPEED MACHINE SUPPORT)
Cc: linux-watchdog@...r.kernel.org (open list:WATCHDOG DEVICE DRIVERS)
Cc: linux-arm-kernel@...ts.infradead.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
Cc: linux-aspeed@...ts.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
Cc: linux-kernel@...r.kernel.org (open list)
Signed-off-by: Eduardo Valentin <eduval@...zon.com>
Signed-off-by: Eduardo Valentin <evalenti@...nel.org>
---
 drivers/watchdog/aspeed_wdt.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index 436571b6fc79..bd06622813eb 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -13,6 +13,11 @@
 #include <linux/platform_device.h>
 #include <linux/watchdog.h>
 
+static bool nowayout = WATCHDOG_NOWAYOUT;
+module_param(nowayout, bool, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
+				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+
 struct aspeed_wdt {
 	struct watchdog_device	wdd;
 	void __iomem		*base;
@@ -266,6 +271,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
 	wdt->wdd.timeout = WDT_DEFAULT_TIMEOUT;
 	watchdog_init_timeout(&wdt->wdd, 0, dev);
 
+	watchdog_set_nowayout(&wdt->wdd, nowayout);
+
 	np = dev->of_node;
 
 	ofdid = of_match_node(aspeed_wdt_of_table, np);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ