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>] [day] [month] [year] [list]
Date:	Fri, 6 Oct 2006 07:18:39 -0600
From:	"Russell Johnson" <rjohnson@...ogic.com>
To:	<linux-kernel@...r.kernel.org>
Subject: bigphysarea mmap and direct_io

My driver is allocating memory via bigphysarea and my application mmap's the
area for performance reasons.  With linux kernels 2.6.14 and prior on i386
platforms, I have been able to issue disk reads using direct_io to fill this
bigphysarea memory and prevent multiple copies of the data.  The file system
code for direct I/O disk reads checks for VM_IO and will not allow direct io
in that case.  So to do this I had my driver clear the VM_IO flag after
calling remap_pfn_range.

With kernel 2.6.16 and newer, remap_pfn_range sets a new flag VM_PFNMAP
which direct_io also checks.  If my driver clears VM_PFNMAP then the kernel
will oops upon an munmap call because it will attempt to free the pages.

I'm looking for the proper way to do what I want which is to allow the
application to mmap and do direct io disk access to the bigphysarea memory.
I've unsuccessfully tried writing a nopage handler and I still get an oops
upon munmap.  Can someone point me in the right direction?

Please cc me as I'm not on this list.  Thanks!

rjohnson@...ogic.com

Russell Johnson
RT Logic! 


-
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