summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2011-02-01 12:39:59 -0800
committerDavid S. Miller <davem@davemloft.net>2011-02-01 12:39:59 -0800
commit2492218c63dca0fb4f041bdc366d243ae3426b40 (patch)
tree7bb9caeba7d5df3a8799d82a5ce6cbc180885587 /arch
parent5edddaab1d5d6143c23fef119a24ea768915681a (diff)
downloadop-kernel-dev-2492218c63dca0fb4f041bdc366d243ae3426b40.zip
op-kernel-dev-2492218c63dca0fb4f041bdc366d243ae3426b40.tar.gz
sparc32: unaligned memory access (MNA) trap handler bug
Since commit f0e98c387e61de00646be31fab4c2fa0224e1efb ("[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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/una_asm_32.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/una_asm_32.S b/arch/sparc/kernel/una_asm_32.S
index 8cc0345..8f096e8 100644
--- a/arch/sparc/kernel/una_asm_32.S
+++ b/arch/sparc/kernel/una_asm_32.S
@@ -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
OpenPOWER on IntegriCloud