History log of /arch/sparc/lib/GENcopy_to_user.S
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
aeb398768345c74a9e4c01aa3ebf839e858312ec 09-Feb-2009 David S. Miller <davem@davemloft.net> 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>
/arch/sparc/lib/GENcopy_to_user.S
40bdac7dbc161639a498697f34fbd1ee800e51f4 09-Feb-2009 David S. Miller <davem@davemloft.net> sparc64: Kill .fixup section bloat.

This is an implementation of a suggestion made by Chris Torek:
--------------------
Something else I noticed in passing: the EX and EX_LD/EX_ST macros
scattered throughout the various .S files make a fair bit of .fixup
code, all of which does the same thing. At the cost of one symbol
in copy_in_user.S, you could just have one common two-instruction
retl-and-mov-1 fixup that they all share.
--------------------

The following is with a defconfig build:

text data bss dec hex filename
3972767 344024 584449 4901240 4ac978 vmlinux.orig
3968887 344024 584449 4897360 4aba50 vmlinux

Signed-off-by: David S. Miller <davem@davemloft.net>
/arch/sparc/lib/GENcopy_to_user.S
478b8fecda511942404ac232897a718cecd13e48 03-Dec-2008 Sam Ravnborg <sam@ravnborg.org> sparc,sparc64: unify lib/

o Renamed files in sparc64 to <name>_64.S when identical
to sparc32 files.
o iomap.c were equal for sparc32 and sparc64
o adjusted sparc/Makefile now we have only one lib/

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
/arch/sparc/lib/GENcopy_to_user.S