summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/uaccess.h
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Fix user_addr_max() definition.David S. Miller2012-05-241-1/+1
| | | | | | | | | | | | | We need to use TASK_SIZE because for 64-bit tasks the value of STACK_TOP actually sits in the middle of the address space so we'll get false-negatives. Adjust the TASK_SIZE definition on sparc64 to accomodate this, in the context in which user_addr_max() is used we have the test_thread_flag() definition available but not the one for test_tsk_thread_flag(). Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Increase portability of strncpy_from_user() implementation.David S. Miller2012-05-241-0/+3
| | | | | | | | | | | | | | Hide details of maximum user address calculation in a new asm/uaccess.h interface named user_addr_max(). Provide little-endian implementation in find_zero(), which should work but can probably be improved. Abstrace alignment check behind IS_UNALIGNED() macro. Kill double-semicolon, noticed by David Howells. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Add full proper error handling to strncpy_from_user().David S. Miller2012-05-221-0/+3
| | | | | | | | | | | | Linus removed the end-of-address-space hackery from fs/namei.c:do_getname() so we really have to validate these edge conditions and cannot cheat any more (as x86 used to as well). Move to a common C implementation like x86 did. And if both src and dst are sufficiently aligned we'll do word at a time copies and checks as well. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc, sparc64: use arch/sparc/includeSam Ravnborg2008-07-271-0/+8
The majority of this patch was created by the following script: *** ASM=arch/sparc/include/asm mkdir -p $ASM git mv include/asm-sparc64/ftrace.h $ASM git rm include/asm-sparc64/* git mv include/asm-sparc/* $ASM sed -ie 's/asm-sparc64/asm/g' $ASM/* sed -ie 's/asm-sparc/asm/g' $ASM/* *** The rest was an update of the top-level Makefile to use sparc for header files when sparc64 is being build. And a small fixlet to pick up the correct unistd.h from sparc64 code. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
OpenPOWER on IntegriCloud