md5sum makes unaligned word accesses...

Rob Landley rob at landley.net
Mon May 15 19:00:33 UTC 2006


On Sunday 14 May 2006 8:06 pm, Michael S. Zick wrote:
> > > so, we're already penalizing systems, we just dont notice ;)
> >
> > I'm talking about binary size, not performance.  And the big bottleneck
> > is the cache line fetches, not the internal processing; try actually
> > benching stuff and the alignment is likely to be noise at best.
>
> Say what? Read:
>
> linux/arch/parisc/kernel/unaligned.c which is called from a trap handler.
>
> Are you saying that process is faster than a data cache line fetch?

Not in that case, no.

I just looked into it a bit more and there are even some ppc variants that 
trap and fixup the unaligned access in software rather than microcode, so 
it's more pervasive than I thought.

Hmmm...  Looks like I might be able to fixup md5_hash_bytes() to handle this 
(since it's setup to memcpy stuff anyway).  Just fixup md5_hash() to test 
both alignment _and_ length, and then...

Hmmm...

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list