Commit 2492218c authored by Daniel Hellstrom's avatar Daniel Hellstrom Committed by David S. Miller

sparc32: unaligned memory access (MNA) trap handler bug

Since commit f0e98c38 ("[SPARC]: Fix
link errors with gcc-4.3") the MNA trap handler does not emulate
stores to unaligned addresses correctly. MNA operation from both
kernel and user space are affected.

A typical effect of this bug is nr_frags in skbs are overwritten
during buffer copying/checksum-calculation, or maximally 6 bytes
of data in the network buffer will be overwitten with garbage.
Signed-off-by: default avatarDaniel Hellstrom <daniel@gaisler.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5edddaab
...@@ -24,9 +24,9 @@ retl_efault: ...@@ -24,9 +24,9 @@ retl_efault:
.globl __do_int_store .globl __do_int_store
__do_int_store: __do_int_store:
ld [%o2], %g1 ld [%o2], %g1
cmp %1, 2 cmp %o1, 2
be 2f be 2f
cmp %1, 4 cmp %o1, 4
be 1f be 1f
srl %g1, 24, %g2 srl %g1, 24, %g2
srl %g1, 16, %g7 srl %g1, 16, %g7
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment