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
ashrdi3.S
atomic32.c
atomic_32.S
atomic_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
bitext.c
bitops.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
blockops.S
bzero.S sparc64: Kill .fixup section bloat. 2009-02-08 22:00:55 -08:00
checksum_32.S
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
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
COPYING.LIB
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
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
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
locks.S
lshrdi3.S
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
memmove.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
memscan_32.S
memscan_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
memset.S
mul.S
muldi3.S
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
rwsem_32.S
rwsem_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
sdiv.S
strlen_user_32.S
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
strncmp_64.S sparc,sparc64: unify lib/ 2008-12-04 09:17:19 -08:00
strncpy_from_user_32.S
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
udivdi3.S
umul.S
urem.S
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