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]
Date:	Fri, 14 Mar 2008 11:28:36 +0100
From:	"Hans J. Koch" <hjk@...utronix.de>
To:	Greg KH <greg@...ah.com>
Cc:	Hans J Koch <hjk@...utronix.de>, linux-kernel@...r.kernel.org,
	Juergen Beisert <juergen127@...uzholzen.de>,
	Jean-Samuel Chenard <jsamch@...il.com>
Subject: [PATCH] Add pgprot_noncached() to UIO mmap code

From: Jean-Samuel Chenard <jsamch@...il.com>
To: Greg KH <greg@...ah.com>
Cc: Hans J Koch <hjk@...utronix.de>, linux-kernel@...r.kernel.org,
 Juergen Beisert <juergen127@...uzholzen.de>
Date: Fri, 14 Mar 2008 11:19:49 +0100
Subject: Add pgprot_noncached() to UIO mmap code

Mapping of physical memory in UIO needs pgprot_noncached() to ensure
that IO memory is not cached. Without pgprot_noncached(), it (accidentally)
works on x86 and arm, but fails on PPC.

Signed-off-by: Jean-Samuel Chenard <jsamch@...il.com>
Signed-off-by: Hans J Koch <hjk@...utronix.de>

---
 drivers/uio/uio.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6.25-rc/drivers/uio/uio.c
===================================================================
--- linux-2.6.25-rc.orig/drivers/uio/uio.c	2008-03-14 11:00:59.000000000 +0100
+++ linux-2.6.25-rc/drivers/uio/uio.c	2008-03-14 11:03:13.000000000 +0100
@@ -470,6 +470,8 @@
 
 	vma->vm_flags |= VM_IO | VM_RESERVED;
 
+	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+
 	return remap_pfn_range(vma,
 			       vma->vm_start,
 			       idev->info->mem[mi].addr >> PAGE_SHIFT,
--
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