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:
Arnd Bergmann
2020-01-16 15:58:41 +01:00
parent c52801a774
commit 0cd1151886
3 changed files with 2 additions and 114 deletions

View File

@@ -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>