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: <17e323d8-f8d3-4e5a-91aa-0788b8026f21@roeck-us.net>
Date: Thu, 18 Jan 2024 19:55:39 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Tzung-Bi Shih <tzungbi@...nel.org>, Lukasz Majczak <lma@...omium.org>
Cc: 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 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.

>> diff --git a/drivers/watchdog/cros_ec_wdt.c b/drivers/watchdog/cros_ec_wdt.c
> [...]
>> +static int cros_ec_wdt_ping(struct watchdog_device *wdd)
>> +{
> [...]
>> +	arg.req.command = EC_HANG_DETECT_CMD_RELOAD;
>> +	ret = cros_ec_wdt_send_cmd(cros_ec, &arg);
>> +	if (ret < 0)
>> +		dev_dbg(wdd->parent, "Failed to ping watchdog (%d)", ret);
> 
> I think this would be worth dev_info() or dev_warn()?
> 
>> +static int cros_ec_wdt_start(struct watchdog_device *wdd)
>> +{
> [...]
>> +	/* Prepare watchdog on EC side */
>> +	arg.req.command = EC_HANG_DETECT_CMD_SET_TIMEOUT;
>> +	arg.req.reboot_timeout_sec = wdd->timeout;
>> +	ret = cros_ec_wdt_send_cmd(cros_ec, &arg);
>> +	if (ret < 0)
>> +		dev_dbg(wdd->parent, "Failed to start watchdog (%d)", ret);
> 
> Same here: dev_info() or dev_warn()?
> 

We had that before. It is just noise. If it fails, it will likely
fail continuously, causing log spam. We don't do that kind of
continuous error messages for other watchdog drivers and should not
start doing it here.

Thanks,
Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ