android_kernel_xiaomi_sm7250/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
bitext.c
bitops.S
blockops.S
bzero.S sparc64: Kill .fixup section bloat. 2009-02-08 22:00:55 -08:00
checksum_32.S
checksum_64.S
clear_page.S
cmpdi2.c
copy_in_user.S sparc64: Fix probe_kernel_{read,write}(). 2009-02-08 22:32:31 -08:00
copy_page.S
copy_user.S
COPYING.LIB
csum_copy_from_user.S
csum_copy_to_user.S
csum_copy.S
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
GENpage.S
GENpatch.S
iomap.c
ipcsum.S
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
memcmp.S sparc: Commonize memcmp assembler. 2008-12-09 04:09:07 -08:00
memcpy.S
memmove.S
memscan_32.S
memscan_64.S
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
NG2page.S
NG2patch.S
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
NGpage.S
NGpatch.S
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
sdiv.S
strlen_user_32.S
strlen_user_64.S
strlen.S sparc: Unify strlen assembler. 2008-12-09 01:07:09 -08:00
strncmp_32.S
strncmp_64.S
strncpy_from_user_32.S
strncpy_from_user_64.S
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
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
U3patch.S
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
xor.S