From: Helge Deller Date: Wed, 9 Oct 2013 21:47:03 +0000 (+0200) Subject: parisc: let probe_kernel_read() capture access to page zero X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=db080f9c530f78dad661257885a1893506077068;p=openwrt%2Fstaging%2Fblogic.git parisc: let probe_kernel_read() capture access to page zero Signed-off-by: Helge Deller --- diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index ac4370b1ca40..b5507ec06b84 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c @@ -56,7 +56,7 @@ #ifdef __KERNEL__ #include #include -#include +#include #define s_space "%%sr1" #define d_space "%%sr2" #else @@ -524,4 +524,17 @@ EXPORT_SYMBOL(copy_to_user); EXPORT_SYMBOL(copy_from_user); EXPORT_SYMBOL(copy_in_user); EXPORT_SYMBOL(memcpy); + +long probe_kernel_read(void *dst, const void *src, size_t size) +{ + unsigned long addr = (unsigned long)src; + + if (size < 0 || addr < PAGE_SIZE) + return -EFAULT; + + /* check for I/O space F_EXTEND(0xfff00000) access as well? */ + + return __probe_kernel_read(dst, src, size); +} + #endif