RE: Clobbered file after jffs2 mount

David Woodhouse
2007-09-22T01:51:01Z

On Fri, 2007-09-21 at 21:35 -0400, Jon Ringle wrote:
> I tried init=/bin/sh on a first boot after reflash and the md5sum of
> sshd was correct. I then rebooted again normally and the ssh keys were
> generated. When I logged in, the md5sum of sshd was wrong. The
> corruption that I observe is always the same incorrect md5sum.

But there's no corruption on the _flash_ -- if you boot with
init=/bin/sh again after the keys are generated, you again get the
_correct_ md5sum? I'm fairly certain of that, since the failure mode
you'll get if you manage to scribble on the flash is that the data CRC
will fail and you'll get zeroes where the offending nodes go missing.

It's going to be something scribbling on the RAM pages after the file is
read from the file system. Be thankful it looks fairly repeatable. Can
you put a hardware watchpoint on the offending page in the page cache,
after it's read? And can you disable _everything_ in the system which
uses DMA, one at a time?

--
dwmw2