md5sum makes unaligned word accesses...
Rob Landley
rob at landley.net
Fri May 12 20:57:00 UTC 2006
On Friday 12 May 2006 12:43 am, Mike Frysinger wrote:
> On Thursday 11 May 2006 12:22, Rob Landley wrote:
> > On Thursday 11 May 2006 2:05 am, Andre wrote:
> > > Anyway, comparing the faulting PC with a disassembly of busybox, it
> > > looks like the fault happens in md5_hash_block()
> > >
> > > void md5_hash_block(const void *buffer, size_t len, md5_ctx_t *ctx)
> > > {
> > > uint32_t correct_words[16];
> > > const uint32_t *words = buffer;
> > > ....
> > >
> > > Casting a void * to an unsigned int * is highly suspect unless all
> > > callers of md5_has_block() somehow know that 'buffer' has implicit
> > > alignment constraints...
>
> considering there is only one caller of md5_has_block(), this is possible
> or in md5_hash_block(), make use of posix_memalign()
There's a posix_memalign()? So there is...
> > But it doesn't on any other platform.
>
> alignment issues arent arm-specific
Yeah, but do we support another platform yet that cares?
I'm all for fixing it. I just don't want to penalize systems that don't need
the fix.
> > Looks like we need to add some thing like this to plaform.h:
>
> garbage
*sniffle* Lower lib trembles...
> -mike
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list