lib: Sparc's strncpy_from_user is generic enough, move under lib/

To use this, an architecture simply needs to:

1) Provide a user_addr_max() implementation via asm/uaccess.h

2) Add "select GENERIC_STRNCPY_FROM_USER" to their arch Kcnfig

3) Remove the existing strncpy_from_user() implementation and symbol
   exports their architecture had.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David S. Miller
2012-05-24 13:12:28 -07:00
parent 446969084d
commit 2922585b93
5 changed files with 152 additions and 144 deletions

View File

@@ -32,6 +32,7 @@ config SPARC
select HAVE_NMI_WATCHDOG if SPARC64
select HAVE_BPF_JIT
select GENERIC_SMP_IDLE_THREAD
select GENERIC_STRNCPY_FROM_USER
config SPARC32
def_bool !64BIT