OpenCloudOS-Kernel/arch/sparc/lib
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
..
COPYING.LIB Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
GENbzero.S sparc64: Kill .fixup section bloat. 2009-02-08 22:00:55 -08:00
GENcopy_from_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
GENcopy_to_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
GENmemcpy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
GENpage.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
GENpatch.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
Makefile sparc64: Make rwsems 64-bit. 2010-08-17 22:49:26 -07:00
NG2copy_from_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
NG2copy_to_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
NG2memcpy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
NG2page.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
NG2patch.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
NGbzero.S sparc64: Kill .fixup section bloat. 2009-02-08 22:00:55 -08:00
NGcopy_from_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
NGcopy_to_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
NGmemcpy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
NGpage.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
NGpatch.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
PeeCeeI.c sparc64: move EXPORT_SYMBOL to the symbols definition 2009-01-08 16:58:20 -08:00
U1copy_from_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
U1copy_to_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
U1memcpy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
U3copy_from_user.S sparc64: Kill .fixup section bloat. 2009-02-08 22:00:55 -08:00
U3copy_to_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
U3memcpy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
U3patch.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
VISsave.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
ashldi3.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
ashrdi3.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
atomic32.c sparc: Replace deprecated spinlock initialization 2011-01-27 12:30:37 +01:00
atomic_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
atomic_64.S sparc64: Make lock backoff really a NOP on UP builds. 2010-08-18 22:53:26 -07:00
bitext.c sparc: use bitmap_set() 2011-02-08 22:52:53 -08:00
bitops.S sparc64: Make lock backoff really a NOP on UP builds. 2010-08-18 22:53:26 -07:00
blockops.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
bzero.S sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
checksum_32.S sparc32: Fixed unaligned memory copying in function __csum_partial_copy_sparc_generic 2011-05-11 21:35:04 -07:00
checksum_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
clear_page.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
cmpdi2.c [SPARC32]: Add __cmpdi2() libcall implementation ala. MIPS. 2007-08-26 18:49:09 -07:00
copy_in_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
copy_page.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
copy_user.S [SPARC]: Don't zero out tail during copy_from_user_inatomic(). 2006-09-29 16:12:41 -07:00
csum_copy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
csum_copy_from_user.S sparc64: Fix section attribute warnings. 2009-05-29 16:12:02 -07:00
csum_copy_to_user.S sparc64: Fix section attribute warnings. 2009-05-29 16:12:02 -07:00
divdi3.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iomap.c iomap: fix 64 bits resources on 32 bits 2008-04-29 08:06:02 -07:00
ipcsum.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
ksyms.c sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
libgcc.h [SPARC32]: Add __cmpdi2() libcall implementation ala. MIPS. 2007-08-26 18:49:09 -07:00
locks.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
lshrdi3.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
mcount.S sparc64: Allocate sufficient stack space in ftrace stubs. 2010-04-13 18:59:02 -07:00
memcmp.S sparc: Commonize memcmp assembler. 2008-12-09 04:09:07 -08:00
memcpy.S sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
memmove.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
memscan_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
memscan_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
memset.S sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
mul.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
muldi3.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rem.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
rwsem_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
sdiv.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
strlen.S sparc: Unify strlen assembler. 2008-12-09 01:07:09 -08:00
strlen_user_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
strlen_user_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
strncmp_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
strncmp_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
strncpy_from_user_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
strncpy_from_user_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
udiv.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
udivdi3.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
umul.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
urem.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
user_fixup.c sparc64: move EXPORT_SYMBOL to the symbols definition 2009-01-08 16:58:20 -08:00
usercopy.c sparc: Use __builtin_object_size() to validate the buffer size for copy_from_user() 2009-12-10 23:05:23 -08:00
xor.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00