summaryrefslogtreecommitdiff
path: root/arch/sparc/lib/U1copy_to_user.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-08 22:32:31 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-08 22:32:31 -0800
commitaeb398768345c74a9e4c01aa3ebf839e858312ec (patch)
treec7755f40260ccf89e8f3b765a9b44dcbebcae896 /arch/sparc/lib/U1copy_to_user.S
parent40bdac7dbc161639a498697f34fbd1ee800e51f4 (diff)
downloadlwn-aeb398768345c74a9e4c01aa3ebf839e858312ec.tar.gz
lwn-aeb398768345c74a9e4c01aa3ebf839e858312ec.zip
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>
Diffstat (limited to 'arch/sparc/lib/U1copy_to_user.S')
-rw-r--r--arch/sparc/lib/U1copy_to_user.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/lib/U1copy_to_user.S b/arch/sparc/lib/U1copy_to_user.S
index 59d531b4a1a5..f4b970eeb485 100644
--- a/arch/sparc/lib/U1copy_to_user.S
+++ b/arch/sparc/lib/U1copy_to_user.S
@@ -23,7 +23,7 @@
#define PREAMBLE \
rd %asi, %g1; \
cmp %g1, ASI_AIUS; \
- bne,pn %icc, memcpy_user_stub; \
+ bne,pn %icc, ___copy_in_user; \
nop; \
#include "U1memcpy.S"