bfin: switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
72d6f65dd7
Коммит
50e9ab915a
|
@ -41,6 +41,7 @@ config BLACKFIN
|
||||||
select MODULES_USE_ELF_RELA
|
select MODULES_USE_ELF_RELA
|
||||||
select HAVE_DEBUG_STACKOVERFLOW
|
select HAVE_DEBUG_STACKOVERFLOW
|
||||||
select HAVE_NMI
|
select HAVE_NMI
|
||||||
|
select ARCH_HAS_RAW_COPY_USER
|
||||||
|
|
||||||
config GENERIC_CSUM
|
config GENERIC_CSUM
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
|
@ -144,41 +144,23 @@ static inline int bad_user_access_length(void)
|
||||||
: "a" (__ptr(ptr))); \
|
: "a" (__ptr(ptr))); \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __copy_to_user_inatomic __copy_to_user
|
|
||||||
#define __copy_from_user_inatomic __copy_from_user
|
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
static inline unsigned long __must_check
|
||||||
__copy_from_user(void *to, const void __user *from, unsigned long n)
|
raw_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
{
|
{
|
||||||
memcpy(to, (const void __force *)from, n);
|
memcpy(to, (const void __force *)from, n);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
static inline unsigned long __must_check
|
||||||
__copy_to_user(void __user *to, const void *from, unsigned long n)
|
raw_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
{
|
{
|
||||||
memcpy((void __force *)to, from, n);
|
memcpy((void __force *)to, from, n);
|
||||||
SSYNC();
|
SSYNC();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
#define INLINE_COPY_FROM_USER
|
||||||
copy_from_user(void *to, const void __user *from, unsigned long n)
|
#define INLINE_COPY_TO_USER
|
||||||
{
|
|
||||||
if (likely(access_ok(VERIFY_READ, from, n)))
|
|
||||||
return __copy_from_user(to, from, n);
|
|
||||||
memset(to, 0, n);
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
|
||||||
copy_to_user(void __user *to, const void *from, unsigned long n)
|
|
||||||
{
|
|
||||||
if (likely(access_ok(VERIFY_WRITE, to, n)))
|
|
||||||
return __copy_to_user(to, from, n);
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy a null terminated string from userspace.
|
* Copy a null terminated string from userspace.
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче