lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 13 Sep 2009 16:46:12 +0100 (BST)
From:	Hugh Dickins <hugh.dickins@...cali.co.uk>
To:	Minchan Kim <minchan.kim@...il.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mel@....ul.ie>,
	Jeff Chua <jeff.chua.linux@...il.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Nick Piggin <npiggin@...e.de>, Rik van Riel <riel@...hat.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 4/8] mm: FOLL_DUMP replace FOLL_ANON

On Thu, 10 Sep 2009, Minchan Kim wrote:
> >        /*
> >         * When core dumping an enormous anonymous area that nobody
> > -        * has touched so far, we don't want to allocate page tables.
> > +        * has touched so far, we don't want to allocate unnecessary pages or
> > +        * page tables.  Return error instead of NULL to skip handle_mm_fault,
> > +        * then get_dump_page() will return NULL to leave a hole in the dump.
> > +        * But we can only make this optimization where a hole would surely
> > +        * be zero-filled if handle_mm_fault() actually did handle it.
> >         */
> > -       if (flags & FOLL_ANON) {
> > -               page = ZERO_PAGE(0);
> > -               if (flags & FOLL_GET)
> > -                       get_page(page);
> > -               BUG_ON(flags & FOLL_WRITE);
> > -       }
> > +       if ((flags & FOLL_DUMP) &&
> > +           (!vma->vm_ops || !vma->vm_ops->fault))
> 
> How about adding comment about zero page use?

What kind of comment did you have in mind?
We used to use ZERO_PAGE there, but with this patch we're not using it.
I thought the comment above describes what we're doing well enough.

I may have kept too quiet about ZERO_PAGEs, knowing that a later patch
was going to change the story; but I don't see what needs saying here.

Hugh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ