md5sum makes unaligned word accesses...

Andre armcc2000 at yahoo.com
Wed May 10 04:57:56 UTC 2006


--- Mike Frysinger <vapier at gentoo.org> wrote:
> On Tuesday 09 May 2006 23:56, Andre wrote:
> > (This is ARM specific and ensures that userspace alignment faults
> > don't cause silent data corruption... which unfortunately is the
> > default behaviour).
> 
> i'm pretty sure the kernel handles this stuff sanely ... it would
> either fixup the unaligned access or kill the process, not let
> "silent data corruption" happen ...
> 

Unfortunately not. For historical reasons (of which I'm not 100%
clear) the default value in /proc/cpu/alignment on ARM is 0 (no
fixup, no warning). Here's hoping the default can be changed along
with the switch to EABI... 

> this also isnt an arm-specific issue as many other arches are anal
> about accessing memory aligned
> 
> indeed, running
> `busybox dd if=/dev/zero bs=1 count=123 | busybox md5sum`
> on some of my arm/amd64/ia64 machines yielded same correct result
> -mike

count=123 works for me as well.
count=12345 reliably triggers the bug.

Andre
--



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the busybox mailing list