summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2013-10-09 23:47:03 +0200
committerHelge Deller <deller@gmx.de>2013-10-13 17:46:31 +0200
commitdb080f9c530f78dad661257885a1893506077068 (patch)
tree8bd6402f4e06a271937f2dd3ed70e9de7ffee081
parent2d8b22de6e5241a6f27f7f290f027223156a7d3f (diff)
downloadop-kernel-dev-db080f9c530f78dad661257885a1893506077068.zip
op-kernel-dev-db080f9c530f78dad661257885a1893506077068.tar.gz
parisc: let probe_kernel_read() capture access to page zero
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--arch/parisc/lib/memcpy.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c
index ac4370b..b5507ec 100644
--- a/arch/parisc/lib/memcpy.c
+++ b/arch/parisc/lib/memcpy.c
@@ -56,7 +56,7 @@
#ifdef __KERNEL__
#include <linux/module.h>
#include <linux/compiler.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
#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
OpenPOWER on IntegriCloud