lkml.org 
[lkml]   [2005]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/16] IB uverbs: memory pinning implementation
Roland Dreier <rolandd@cisco.com> wrote:
>
> Add support for pinning userspace memory regions and returning a list
> of pages in the region. This includes tracking pinned memory against
> vm_locked and preventing unprivileged users from exceeding RLIMIT_MEMLOCK.
>

Can you tell us a bit more about the design ideas here? What's it doing,
how and why?

We should look at these things and also decide whether some of this should
live in mm/*.
> +int ib_umem_get(struct ib_device *dev, struct ib_umem *mem,
> + void *addr, size_t size, int write)
> +{
> ...
> + if (!can_do_mlock())
> + return -EPERM;
> +
> ...
> + if ((locked > lock_limit) && !capable(CAP_IPC_LOCK)) {

The capable() test is redundant.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-29 02:50    [from the cache]
©2003-2011 Jasper Spaans