Commit Graph

3 Commits

Author SHA1 Message Date
Tkhai Kirill b1054282d7 sparc32: Fixed unaligned memory copying in function __csum_partial_copy_sparc_generic
When we are in the label cc_dword_align, registers %o0 and %o1 have the same last 2 bits,
but it's not guaranteed one of them is zero. So we can get unaligned memory access
in label ccte. Example of parameters which lead to this:
%o0=0x7ff183e9, %o1=0x8e709e7d, %g1=3

With the parameters I had a memory corruption, when the additional 5 bytes were rewritten.
This patch corrects the error.

One comment to the patch. We don't care about the third bit in %o1, because cc_end_cruft
stores word or less.

Signed-off-by: Tkhai Kirill <tkhai@yandex.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-11 21:35:04 -07:00
David S. Miller 4d14a45985 sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}()
This mirrors commit ff60fab71b
(x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy)

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-10 23:32:10 -08:00
Sam Ravnborg 18269c0fd4 sparc: prepare lib/ for unification
Identical named files renamed to <name>_32.S
Refactored Makefile to prepare for unification.

Linking order was altered slightly - but this is a lib.a file so
it should not matter.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:18 -08:00