lkml.org 
[lkml]   [2005]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
    Andrew Morton wrote:

    > I'm referring to an application which uses your syscalls to obtain pinned
    > memory and uses munlock() so that it may then use your syscalls to obtain
    > evem more pinned memory. With the objective of taking the machine down.

    I'm in favor of having drivers call do_mlock() and do_munlock() on behalf of the
    application. All we need to do is export those functions, and my driver can call them.
    However, that still doesn't prevent an app from calling munlock().

    But I don't understand the distinction between having the driver call do_mlock() vs. the
    application calling mlock(). Won't we still have the same problems? A malicious app can
    just call our driver instead of calling mlock() or munlock(). The driver won't know the
    difference between an authorized app and an unauthorized one.

    Besides, isn't the whole point behind RLIMIT_MEMLOCK to limit how much one process can lock?

    > I haven't even thought about memory hotswap. Surely it'll fail if the
    > pages are pinned by get_user_pages()?

    Any memory registered for RDMA devices obviously can't be swapped out. Technically, the
    driver could detect that, and reject any attempt to transfer data to those regions until
    everything is remapped to other RAM. But that's opening a whole new can of worms. I
    don't know how the memory hotswap mechanism works, so I can't guess what recovery
    mechanisms can be implemented in the driver.

    -
    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-04-26 05:43    [W:7.985 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site