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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <569E34C4.5020005@roeck-us.net>
Date:	Tue, 19 Jan 2016 05:06:12 -0800
From:	Guenter Roeck <linux@...ck-us.net>
To:	Sandeep Tripathy <tripathy@...adcom.com>, wim@...ana.be
Cc:	viresh.kumar@...aro.org, linux-watchdog@...r.kernel.org,
	linux-kernel@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH v2 1/1] watchdog: sp805: ping fails to abort wdt reset

On 01/19/2016 01:14 AM, Sandeep Tripathy wrote:
> sp805 wdt asserts interrupt for the first expiry and
> reloads the counter. If wdt interrupt is set and count
> reaches zero then wdt reset event is generated. To get
> wdt reset at 't' timeout the driver loads wdt counter
> with 't/2'. A ping before time 't'  *should* prevent
> wdt reset. Currently if ping is done after 't/2' then
> wdt interrupt condition gets set. On the next countdown
> of loadval wdt reset event occurs eventhough wdt was
> reloaded before the set timeout 't'.
>
> This patch clears the interrupt condition on ping.
>
> Signed-off-by: Sandeep Tripathy <tripathy@...adcom.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/watchdog/sp805_wdt.c |    5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index 01d8162..e7a715e 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
> @@ -139,12 +139,11 @@ static int wdt_config(struct watchdog_device *wdd, bool ping)
>
>   	writel_relaxed(UNLOCK, wdt->base + WDTLOCK);
>   	writel_relaxed(wdt->load_val, wdt->base + WDTLOAD);
> +	writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
>
> -	if (!ping) {
> -		writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
> +	if (!ping)
>   		writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base +
>   				WDTCONTROL);
> -	}
>
>   	writel_relaxed(LOCK, wdt->base + WDTLOCK);
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ