[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080418120634.986e30f1.akpm@linux-foundation.org>
Date: Fri, 18 Apr 2008 12:06:34 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: netdev@...r.kernel.org, Max Krasnyansky <maxk@...lcomm.com>,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] tun: vringfd xmit support.
On Sat, 19 Apr 2008 01:15:15 +1000 Rusty Russell <rusty@...tcorp.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@...tcorp.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists