lkml.org 
[lkml]   [2012]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC G-U-P experts] IB/umem: Modernize our get_user_pages() parameters
On Fri, Jan 27, 2012 at 06:31:07PM -0800, Hugh Dickins wrote:

> My first impression is that that's not what you want at all: that will
> not do a preliminary COW of anonymous page to be written into by the
> driver when the user only wants VM_READ access. But perhaps I'm
> worrying about the second order while you're sticking to first order.

IMHO, in this instance, the RDMA driver should not violate the
mprotect flags of the page, ie if you ask to register memory for
RDMA WRITE that the process cannot write to, that should be denied.

I know accessing system memory (eg obtained via mmap on
/sys/bus/pci/devices/0000:00:02.0/resource0) has been asked for in the
past, and IIRC, the problem was that some of the common code, (GUP?)
errored on these maps. I don't know if Roland's case is similar.

The main point (at least before) was to have a uniform userspace API
for memory registration that worked on any address range mapped into
the process no matter where it came from. Currently the API just calls
GUP unconditionally...

Jason


\
 
 \ /
  Last update: 2012-01-28 20:29    [W:0.374 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site