lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAGh4K3Kq7n7YjqomZbT7S-KVTMXfN96S1kLnWrUM5KM=DpJfUA@mail.gmail.com>
Date:	Fri, 4 Jan 2013 16:10:45 -0500
From:	Christopher Sacchi <chris.sacchi@...il.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: PATCH: Pagemap.h check PAGE_CACHE_SIZE > PAGE_SIZE

This is for Linux 3.8-rc2. Checked with checkpatch.pl and formatted
correctly with git.


>From 039fbd466cfadaaea0ea1215cc19d5e0d06577ea Mon Sep 17 00:00:00 2001
From: "Christopher P. Sacchi" <chris.sacchi@...il.com>
Date: Fri, 4 Jan 2013 15:56:44 -0500
Subject: [PATCH] pagemap.h: Adds an if to check to see if PAGE_CACHE_SIZE >
 PAGE_SIZE.


Signed-off-by: Christopher P. Sacchi <chris.sacchi@...il.com>
---
 pagemap.patch |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 pagemap.patch

diff --git a/pagemap.patch b/pagemap.patch
new file mode 100644
index 0000000..ed12893
--- /dev/null
+++ b/pagemap.patch
@@ -0,0 +1,24 @@
+Signed-off-by: Christopher P. Sacchi chris.sacchi@...il.com
+--- pagemap.h	2013-01-04 15:44:17.713123984 -0500
++++ pagemap.h	2013-01-04 15:46:35.681120547 -0500
+@@ -1,3 +1,4 @@
++START:
+ #ifndef _LINUX_PAGEMAP_H
+ #define _LINUX_PAGEMAP_H
+
+@@ -424,8 +425,14 @@ extern void add_page_wait_queue(struct p
+  * Fault a userspace page into pagetables.  Return non-zero on a fault.
+  *
+  * This assumes that two userspace pages are always sufficient.  That's
+- * not true if PAGE_CACHE_SIZE > PAGE_SIZE.
++ * not true if PAGE_CACHE_SIZE > PAGE_SIZE. Check if
++ * PAGE_CACHE_SIZE > PAGE_SIZE; return 1 if true,
++ * then goto START.
+  */
++if (PAGE_CACHE_SIZE > PAGE_SIZE) {
++	return 1;
++	goto START;
++}
+ static inline int fault_in_pages_writeable(char __user *uaddr, int size)
+ {
+ 	int ret;
-- 
1.7.9.5

Regards,

Christopher
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ