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]
Message-ID: <ZaoIguOBWrahSRkv@google.com>
Date: Fri, 19 Jan 2024 13:28:34 +0800
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Lukasz Majczak <lma@...omium.org>,
	Gwendal Grignou <gwendal@...omium.org>,
	Radoslaw Biernacki <biernacki@...gle.com>,
	Wim Van Sebroeck <wim@...ux-watchdog.org>,
	Lee Jones <lee@...nel.org>, Benson Leung <bleung@...omium.org>,
	Guenter Roeck <groeck@...omium.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
	chrome-platform@...ts.linux.dev
Subject: Re: [PATCH v2 2/3] watchdog: Add ChromeOS EC-based watchdog driver

On Thu, Jan 18, 2024 at 07:55:39PM -0800, Guenter Roeck wrote:
> On 1/18/24 19:42, Tzung-Bi Shih wrote:
> > On Thu, Jan 18, 2024 at 07:53:23PM +0000, Lukasz Majczak wrote:
> > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> > > index 7d22051b15a2..4700b218340f 100644
> > > --- a/drivers/watchdog/Kconfig
> > > +++ b/drivers/watchdog/Kconfig
> > > @@ -181,6 +181,17 @@ config BD957XMUF_WATCHDOG
> > >   	  watchdog. Alternatively say M to compile the driver as a module,
> > >   	  which will be called bd9576_wdt.
> > > +config CROS_EC_WATCHDOG
> > > +	tristate "ChromeOS EC-based watchdog"
> > > +	select WATCHDOG_CORE
> > > +	depends on CROS_EC
> > > +	help
> > > +	  Watchdog driver for Chromebook devices equipped with embedded controller.
> > > +	  Trigger event is recorded in EC and checked on the subsequent boot.
> > 
> > Perhaps unrelated to the patch, but I'm curious what the mechanism is.  Does
> > it use any existing paths for checking the saved events in EC?  What it does
> > if there is a saved WDT reset event?
> > 
> 
> Reporting the reason of the previous reset/restart is part of the watchdog API.

Oh, I see.  It is in cros_ec_wdt_probe(): `wdd->bootstatus`.

+static int cros_ec_wdt_probe(struct platform_device *pdev)
+{
[...]
+	arg.req.command = EC_HANG_DETECT_CMD_GET_STATUS;
+	ret = cros_ec_wdt_send_cmd(cros_ec, &arg);
[...]
+	if (arg.resp.status == EC_HANG_DETECT_AP_BOOT_EC_WDT)
+		wdd->bootstatus = WDIOF_CARDRESET;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ