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: <1225398691.27415.170.camel@localhost.localdomain>
Date:	Thu, 30 Oct 2008 15:31:31 -0500
From:	Nate Case <ncase@...-inc.com>
To:	David Brownell <david-b@...bell.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc-ds1307: Reset bogus register values on m41t00

On Thu, 2008-10-30 at 10:06 -0700, David Brownell wrote:
> You'r sure that the m41t00 oscillator keeps going in this odd
> state you're defending against, and it wouldn't suffice to have
> the time and date registers initialized when restarting the
> oscillator?

I'm fairly certain.  I just went back and double-checked, and here is
what happened:

1) I modified rtc-ds1307.c to not do my register resets, left in the
exit-bad-on-bogus-register case, and changed the dev_dbg() call to
dev_warn() in that case so that I could see when the driver was bailing
out.

2) Powered down board, drained supercap so that Vbat is no longer
powering the M41T00.

3) Booted into Linux, and saw the following in the boot log:

     rtc-ds1307 0-0068: bogus register: 11 00 41 09 40 e1 01
     [snip]
     drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

   Already to me this shows the problem.  The driver bailed out,
   but I never see the "SET TIME!" message that would have been
   shown if the driver detected that the oscillator was not running
   and started it manually.
 
4) Just to be sure, I ran some checks once I booted up:

   # Shows that the 'seconds' register is incrementing as expected,
   # indicating that the oscillator is running.
   $ i2cget -f -y 0 0x68 0 b ; sleep 10 ; i2cget -f -y 0 0x68 0 b
   0x31
   0x41

   # Shows that a bogus value is present in the 'months' register
   $ i2cget -f -y 0 0x68 5 b
   0xe1

We use this chip on a lot of different boards here, and I've seen the
problem on multiple designs/platforms ever since we made the switch from
the old m41t00 driver to rtc-ds1307.

It could be that the boot loader is doing something to get the chip into
this state, but FWIW I've seen this happen with 2 or 3 different boot
loaders.

I'll go ahead and re-spin the patch.

-- 
Nate Case <ncase@...-inc.com>

--
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