Skip to content

Commit

Permalink
sparc32: unaligned memory access (MNA) trap handler bug
Browse files Browse the repository at this point in the history
Since commit f0e98c3 ("[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: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Feb 1, 2011
1 parent 5edddaa commit 2492218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc/kernel/una_asm_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ retl_efault:
.globl __do_int_store
__do_int_store:
ld [%o2], %g1
cmp %1, 2
cmp %o1, 2
be 2f
cmp %1, 4
cmp %o1, 4
be 1f
srl %g1, 24, %g2
srl %g1, 16, %g7
Expand Down

0 comments on commit 2492218

Please sign in to comment.