Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation

From: Caitlin Bestler
Date: Tue Apr 26 2005 - 22:22:22 EST

On 4/26/05, Andrew Morton <akpm@xxxxxxxx> wrote:

> >
> > However I don't see how to make it work if I put the reference
> > counting for overlapping regions in userspace but when I want mlock()
> > accounting in the kernel. If a buggy/malicious app does:
> >
> > a) register from 0x0000 to 0x2fff
> > b) register from 0x1000 to 0x1fff
> > c) unregister from 0x0000 to 0x2fff
> As far as the kernel is concerned, step b) should be a no-op. (The kernel
> might choose to split the vma, but that's not significant).

If "register" and "unregister" is meant in the RDMA sense then the above
sequence is totally reasonable. The b) registration could be for a different
protection domain that did not require access to all of the larger region.

Unless a full counting lock is available from the kernel, the responsibility
of the collective RDMA components would be to a) pin 0x0000 to 0x2fff,
b) nothing c) unpin 0x000 to 0x0fff and 0x2000 to 0x2fff
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at