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]
Date:	Wed, 11 May 2016 14:23:26 -0500
From:	Reza Arbab <arbab@...ux.vnet.ibm.com>
To:	Yasuaki Ishimatsu <yasu.isimatu@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Daniel Kiper <daniel.kiper@...cle.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Tang Chen <tangchen@...fujitsu.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	David Vrabel <david.vrabel@...rix.com>,
	Vitaly Kuznetsov <vkuznets@...hat.com>,
	David Rientjes <rientjes@...gle.com>,
	Andrew Banman <abanman@....com>,
	Chen Yucong <slaoub@...il.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
Subject: Re: [PATCH 2/3] memory-hotplug: more general validation of zone
 during online

On Wed, May 11, 2016 at 08:17:41AM -0700, Yasuaki Ishimatsu wrote:
>On Tue, 10 May 2016 15:39:43 -0500
>Reza Arbab <arbab@...ux.vnet.ibm.com> wrote:
><snip>
>> +	if (idx < target) {
>> +		/* pages must be at end of current zone */
>> +		if (pfn + nr_pages != zone_end_pfn(zone))
>> +			return 0;
><snip>
>> +	if (target < idx) {
>> +		/* pages must be at beginning of current zone */
>> +		if (pfn != zone->zone_start_pfn)
>> +			return 0;
>
>According your patch, memory address must be continuous for changing zone.
>So if memory address is uncontinuous as follows, memory address 0x180000000-0x1FFFFFFFF
>can be changed from ZONE_NORMAL to ZONE_MOVABLE. But memory address 0x80000000-0xFFFFFFFF
>can not be changed from ZONE_NORMAL to ZONE_MOVABLE since it does not meet
>above condition.
>
>Memory address
>  0x80000000 -  0xFFFFFFFF
> 0x180000000 - 0x1FFFFFFFF

Ah, I see. What do you think of this instead?

<snip>
+	if (idx < target) {
+		/* must be the last pages present in current zone */
+		for (i = pfn + nr_pages; i < zone_end_pfn(zone); i++)
+			if (pfn_present(i))
+				return 0;
<snip>
+	if (target < idx) {
+		/* must be the first pages present in current zone */
+		for (i = zone->zone_start_pfn; i < pfn; i++)
+			if (pfn_present(i))
+				return 0;

-- 
Reza Arbab

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ