On Sat, 19 Apr 2008 01:15:15 +1000 Rusty Russell <rusty@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> > > 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. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization