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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e0dd21a0805130655xd8b1c8ap9a329943e25fe6fb@mail.gmail.com>
Date:	Tue, 13 May 2008 15:55:29 +0200
From:	"Johann Baudy" <johaahn@...il.com>
To:	hjk@...utronix.de, gregkh@...e.de
Cc:	linux-kernel@...r.kernel.org
Subject: UIO: phys_mem_access_prot() miss?

Hi Hans, Greg,

I need some help on UIO driver.
I have to add this below workaround (in uio.c) to be able to access
phys memory from user space.
I'm currently using PPC arch.
Am I wrong? or Is it a miss?

static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
{

...
	switch (idev->info->mem[mi].memtype) {
		case UIO_MEM_PHYS:
+       	vma->vm_page_prot = phys_mem_access_prot(filep,
+            idev->info->mem[mi].addr >> PAGE_SHIFT,
+						 vma->vm_end - vma->vm_start,
+						 vma->vm_page_prot);
			return uio_mmap_physical(vma);
		case UIO_MEM_LOGICAL:
...

}

FYI: I've copied those lines from mem char driver in mmap_mem().

Thanks in advance,
Johann
--
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