diff options
author | 2017-03-21 16:35:08 -0400 | |
---|---|---|
committer | 2017-04-06 15:08:42 -0400 | |
commit | 3448890c32c32c482c3ec20baa8fdd2ab4f94cc0 (patch) | |
tree | b8eb010ea889b318923c987b5ded4bd6ce6c8983 /arch/powerpc/lib/usercopy_64.c | |
parent | Merge commit 'a7d2475af7aedcb9b5c6343989a8bfadbf84429b' into uaccess.powerpc (diff) | |
download | linux-dev-3448890c32c32c482c3ec20baa8fdd2ab4f94cc0.tar.xz linux-dev-3448890c32c32c482c3ec20baa8fdd2ab4f94cc0.zip |
powerpc: get rid of zeroing, switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/lib/usercopy_64.c')
-rw-r--r-- | arch/powerpc/lib/usercopy_64.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/powerpc/lib/usercopy_64.c b/arch/powerpc/lib/usercopy_64.c deleted file mode 100644 index 9bd3a3dad78d..000000000000 --- a/arch/powerpc/lib/usercopy_64.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Functions which are too large to be inlined. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#include <linux/module.h> -#include <linux/uaccess.h> - -unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) -{ - if (likely(access_ok(VERIFY_READ, from, n))) - n = __copy_from_user(to, from, n); - else - memset(to, 0, n); - return n; -} - -unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) -{ - if (likely(access_ok(VERIFY_WRITE, to, n))) - n = __copy_to_user(to, from, n); - return n; -} - -unsigned long copy_in_user(void __user *to, const void __user *from, - unsigned long n) -{ - might_sleep(); - if (likely(access_ok(VERIFY_READ, from, n) && - access_ok(VERIFY_WRITE, to, n))) - n =__copy_tofrom_user(to, from, n); - return n; -} - -EXPORT_SYMBOL(copy_from_user); -EXPORT_SYMBOL(copy_to_user); -EXPORT_SYMBOL(copy_in_user); - |