lkml.org 
[lkml]   [2008]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] tun: vringfd xmit support.
On Sat, 19 Apr 2008 01:15:15 +1000 Rusty Russell <rusty@rustcorp.com.au> wrote:

> >
> > What is the maximum numbet of pages which an unpriviliged user can
> > concurrently pin with this code?
>
> Since only root can open the tun device, it's currently OK. The old code
> kmalloced and copied: is there some mm-fu reason why pinning userspace memory
> is worse?

We generally try to avoid it - it allows users to dos the box. Although I
suspect that direct-io presently permits users to transiently pin an amount
of memory which is proportional to the number of disks upon which they can
open files.

> Subject: Export release_pages; nice undo for get_user_pages.
>
> Andrew Morton suggests tun/tap use release_pages, but it's not
> exported. It's not clear to me why this is in swap.c, but it exists
> even without CONFIG_SWAP, so that's OK.
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>
> diff -r abd2ad431e5c mm/swap.c
> --- a/mm/swap.c Sat Apr 19 00:34:54 2008 +1000
> +++ b/mm/swap.c Sat Apr 19 01:11:40 2008 +1000
> @@ -346,6 +346,7 @@ void release_pages(struct page **pages,
>
> pagevec_free(&pages_to_free);
> }
> +EXPORT_SYMBOL(release_pages);
>
> /*
> * The pages which we're about to release may be in the deferred lru-addition

acked-by: me.


\
 
 \ /
  Last update: 2008-04-18 21:11    [from the cache]
©2003-2011 Jasper Spaans