JFFS2 OOPS in 2.6.20
Joakim Tjernlund
joakim.tjernlund at transmode.se
Fri Mar 9 05:56:20 EST 2007
On Fri, 2007-03-09 at 09:46 +0000, David Woodhouse wrote:
> On Fri, 2007-03-09 at 10:36 +0100, Joakim Tjernlund wrote:
> > I am starting to think that this error is due to an old design mistake
> > in JFFS2 I pointed out years ago: crc32 sums are seeded with zero instead of -1
>
> Indeed. But you only pointed it out in 2004, which was 3 years too
> late :)
Someone got his archive in order :)
>
> > Zero seed makes an zeroed JFFS2 header match its crc32 and that is what I think
> > is happening here, readinode.c:576 should reject this node but doesn't due to this flaw)
> >
> > What to do:
> > 1) Add extra checks for zeroed headers?
>
> That's the approach in the patch I just sent you.
>
> > 2) Add an config option where one can change the crc32 seed to -1?
>
> If we're going to change it, why not change to something cheaper, like
> Adler32? As you also pointed out. I suspect we should just leave it as
> it is with the extra checks though.
Yeah, but I figured that changing seed was less intrusive. Not
sure how good Alder32 is but if we make an incompatible change we
could change it to something else than crc32. We should measure if
how much faster Adler32 is first though.
You think such a change is worthwhile?
Jocke
More information about the linux-mtd
mailing list