Commit 1acaa921 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: use common 32bit ioctl code

parent dfafbae1
...@@ -31,3 +31,5 @@ obj-$(CONFIG_SMP) += smp.o ...@@ -31,3 +31,5 @@ obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
obj-$(CONFIG_PPC_RTAS) += rtas-proc.o obj-$(CONFIG_PPC_RTAS) += rtas-proc.o
obj-$(CONFIG_SCANLOG) += scanlog.o obj-$(CONFIG_SCANLOG) += scanlog.o
CFLAGS_ioctl32.o += -Ifs/
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -226,10 +226,22 @@ copy_to_user(void *to, const void *from, unsigned long n) ...@@ -226,10 +226,22 @@ copy_to_user(void *to, const void *from, unsigned long n)
return n; return n;
} }
static inline unsigned long
copy_in_user(void *to, const void *from, unsigned long n)
{
if (!access_ok(VERIFY_READ, from, n) ||
!access_ok(VERIFY_WRITE, to, n))
return n;
return __copy_tofrom_user(to, from, n);
}
#define __copy_from_user(to, from, size) \ #define __copy_from_user(to, from, size) \
__copy_tofrom_user((to), (from), (size)) __copy_tofrom_user((to), (from), (size))
#define __copy_to_user(to, from, size) \ #define __copy_to_user(to, from, size) \
__copy_tofrom_user((to), (from), (size)) __copy_tofrom_user((to), (from), (size))
#define __copy_in_user(to, from, size) \
__copy_tofrom_user((to), (from), (size))
extern unsigned long __clear_user(void *addr, unsigned long size); extern unsigned long __clear_user(void *addr, unsigned long size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment