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:	Sun, 26 Sep 2010 17:11:55 +0200
From:	Giel van Schijndel <me@...tis.eu>
To:	Lutz Ballaschke <vegan.grindcore@...glemail.com>
Cc:	Wim van Sebroeck <wim@...ana.be>, linux-watchdog@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 0/3] watchdog: add f71862fg support

On Sun, Sep 26, 2010 at 04:06:29PM +0200, Lutz Ballaschke wrote:
> Furthermore i was thinking about modifying the WDIOC_GETTIMELEFT
> helper function since it simply returns the content of the WDT timer 
> register without regarding whether the driver runs in minute-mode or not
> (thanks to Giel for pointing that out). This means if the driver is loaded 
> with a timeout of >255 seconds (and switches to minute-mode) WDIOC_GETTIMELEFT
> ioctl returns minutes instead of seconds and thus doesn't comply with 
> watchdog-api (e.g. ioctl returns 6(min) not 360(sec)). It might be 
> confusing if one loads the driver with a timeout of let's say 360 seconds 
> and gets 6 minutes returned by ioctl. But imho it's not very accurate to
> return a value of seconds if the wdt doesn't count in seconds. That might
> be even more confusing. This inconsistency on the part of the hardware 
> maybe can't get satisfyingly compensated by the driver. So i'd prefer the 
> most simple solution.

IMO the worst option would be to just return minutes.  Returning
'minutes * 60 = seconds' would be significantly less bad.  So if these
are your options I'd suggest going with the lesser evil.

One other possible option could be returning '(minutes - 1) * 60 + 1'.
That way bad timing decisions based on the (wrong) assumption, that
there are still 60 seconds left until reset, can be averted.

I would however like Wim's opinion on this, as this affects the
Watchdog API's usage.

-- 
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
--
"Good code is its own best documentation. As you're about to add a
 comment, ask yourself, 'How can I improve the code so that this comment
 isn't needed?' Improve the code and then document it to make it even
 clearer."
  -- Steve McConnell

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ