linux/arch/sparc/lib
David S. Miller aeb3987683 sparc64: Fix probe_kernel_{read,write}().
This is based upon a report from Chris Torek and his initial patch.
From Chris's report:

--------------------
This came up in testing kgdb, using the built-in tests -- turn
on CONFIG_KGDB_TESTS, then

    echo V1 > /sys/module/kgdbts/parameters/kgdbts

-- but it would affect using kgdb if you were debugging and looking
at bad pointers.
--------------------

When we get a copy_{from,to}_user() request and the %asi is set to
something other than ASI_AIUS (which is userspace) then we branch off
to a routine called memcpy_user_stub().  It just does a straight
memcpy since we are copying from kernel to kernel in this case.

The logic was that since source and destination are both kernel
pointers we don't need to have exception checks.

But for what probe_kernel_{read,write}() is trying to do, we have to
have the checks, otherwise things like kgdb bad kernel pointer
accesses don't do the right thing.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-08 22:32:31 -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 [SPARC32]: Build fix. 2007-05-31 01:52:51 -07:00
atomic_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08:00
atomic_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
bitext.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
bitops.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
blockops.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
bzero.S sparc64: Kill .fixup section bloat. 2009-02-08 22:00:55 -08:00
checksum_32.S sparc: prepare lib/ for unification 2008-12-04 09:17:18 -08: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
COPYING.LIB Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
csum_copy_from_user.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
csum_copy_to_user.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
csum_copy.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
divdi3.S 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
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: Create a new file lib/ksyms.c and add export of all symbols defined in assembler in lib/ to this file. 2009-01-08 16:57:35 -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
Makefile sparc64: fix modpost failure 2009-01-17 23:12:27 -08:00
mcount.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
memcmp.S sparc: Commonize memcmp assembler. 2008-12-09 04:09:07 -08:00
memcpy.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07: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 [SPARC32]: Fix bug in sparc optimized memset. 2007-07-24 13:41:44 -07: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
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
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
rwsem_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
sdiv.S sparc: remove CVS keywords 2008-05-20 00:33:44 -07: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
strlen.S sparc: Unify strlen assembler. 2008-12-09 01:07:09 -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
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
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
VISsave.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
xor.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00