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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090728032254.GA5889@cr0.nay.redhat.com>
Date:	Tue, 28 Jul 2009 11:24:58 +0800
From:	Amerigo Wang <xiyou.wangcong@...il.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Moussa Ba <moussa.a.ba@...il.com>, linux-kernel@...r.kernel.org,
	xiyou.wangcong@...il.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Matt Mackall <mpm@...enic.com>, Mel Gorman <mel@....ul.ie>,
	Ying Han <yinghan@...gle.com>, Nick Piggin <npiggin@...e.de>,
	jaredeh@...il.com
Subject: Re: [PATCH 1/1] pagemap clear_refs: modify to specify anon or
	mapped vma clearing

On Mon, Jul 27, 2009 at 04:58:20PM -0700, David Rientjes wrote:
>On Mon, 27 Jul 2009, Moussa Ba wrote:
>
>> The other alternative would be to just forgo the additional function
>> clear_refs_walk_vma and rewrite the for loop as:
>> 
>>         for (vma = mm->mmap; vma; vma = vma->vm_next) {
>> 			clear_refs_walk.private = vma;
>> 			if (type < CLEAR_REFS_ALL || type > CLEAR_REFS_MAPPED)
>> 				continue;
>> 			if (is_vm_hugetlb_page(vma))
>> 				continue;
>> 			if (type == CLEAR_REFS_ANON && vma->vm_file)
>> 				continue;
>> 			if (type == CLEAR_REFS_MAPPED && !vma->vm_file)
>> 				continue;
>> 			walk_page_range(vma->vm_start, vma->vm_end, this_walk);
>>         }
>> 
>
>That looks good, with the exception of the check for
>type < CLEAR_REFS_ALL || type > CLEAR_REFS_MAPPED being in the loop.

And also that it looks like is_vm_hugetlb_page() is already checked
outside, no need to check it again. :-)

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ