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] [day] [month] [year] [list]
Date:	Wed, 10 Sep 2014 21:04:07 -0700
From:	Doug Anderson <dianders@...omium.org>
To:	Chris Zhong <zyw@...k-chips.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	zhangqing <zhangqing@...k-chips.com>, xxx <xxx@...k-chips.com>,
	Heiko Stübner <heiko@...ech.de>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	rtc-linux@...glegroups.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RTC: RK808: remove tm_def structure

Chris,

On Wed, Sep 10, 2014 at 7:04 PM, Chris Zhong <zyw@...k-chips.com> wrote:
> Signed-off-by: Chris Zhong <zyw@...k-chips.com>

It's good to add a description, like:

If the date/time is invalid at bootup, there's no reason to set it to
a bogus value.  We can just let the data and time be invalid until
someone makes it valid.

> ---
>
>  drivers/rtc/rtc-rk808.c |   17 ++---------------
>  1 file changed, 2 insertions(+), 15 deletions(-)

Other than the lack of description, this looks great.  It applies atop
Andrew's patch to make tm_dev "static" and works like a charm.

I tested by hacking the device with:
  i2cset -f -y 0 0x1b 0x10 0xc1
  i2cset -f -y 0 0x1b 3 0x32
  i2cset -f -y 0 0x1b 0x10 0xc0

That made it think it was the 32nd day of the month.  I then rebooted and saw:
  [    3.371853] rk808-rtc rk808-rtc: invalid date/time
  [    3.379115] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0
  [    5.411574] rk808-rtc rk808-rtc: hctosys: invalid date/time

I was still able to set the clock.  Once I did it worked fine.


Reviewed-by: Doug Anderson <dianders@...omium.org>
Tested-by: Doug Anderson <dianders@...omium.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ