Re: TCP LAST-ACK state broken in 2.4.17-pre2 [NEW DATA]

Stevie O
2001-12-20T07:37:51Z

At 12:28 PM 12/18/2001 -0800, David S. Miller wrote:
>Unaligned kernel loads and stores must be properly handled by the
>platform code, and on ARM chips where that is possible it is.

I don't know what arch you're using, but I work with ARM7TDMI, which has a
behavior I believe can be found documented in some obscure .pdf from arm.com:

Unaligned accesses wrap.

If you have this:

[mem.] 00 01 02 03 04 05 06 07
[data] 00 11 22 33 44 55 66 77

in little-endian mode,

*(int*)0x00 == 0x33221100
*(int*)0x01 == 0x00332211
*(int*)0x02 == 0x11003322
*(int*)0x03 == 0x22110033
*(int*)0x04 == 0x77665544

At least, that's how ARM's docs seem to describe it. I work with this cpu
embedded in a microcontroller (AT91M40800), and these values result:

*(int*)0x00 == 0x33221100
*(int*)0x01 == 0x33221100
*(int*)0x02 == 0x33221100
*(int*)0x03 == 0x33221100
*(int*)0x04 == 0x77665544

An unaligned access to an assembly-declared variable caused me much grief
once, overwriting the task scheduler's ready-to-run list under certain
conditions...

The moral of the story:
RISC cpus abhor unaligned accesses.

--
Stevie-O

Real programmers use COPY CON PROGRAM.EXE