csky: use generic strncpy/strnlen from_user
Remove the csky implemenation of strncpy/strnlen and instead use the generic versions. The csky version is fairly slow because it always does byte accesses even for aligned data, and it lacks a checks for user_addr_max(). Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -209,12 +209,6 @@ unsigned long raw_copy_to_user(void *to, const void *from, unsigned long n);
|
||||
unsigned long __clear_user(void __user *to, unsigned long n);
|
||||
#define __clear_user __clear_user
|
||||
|
||||
long strncpy_from_user(char *dst, const char *src, long count);
|
||||
#define strncpy_from_user strncpy_from_user
|
||||
|
||||
long strnlen_user(const char *s, long n);
|
||||
#define strnlen_user strnlen_user
|
||||
|
||||
#include <asm/segment.h>
|
||||
#include <asm-generic/uaccess.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user