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] [day] [month] [year] [list]
Message-ID: <5057BC2F.3020008@jp.fujitsu.com>
Date:	Tue, 18 Sep 2012 09:11:27 +0900
From:	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	qiuxishi <qiuxishi@...il.com>, <mgorman@...e.de>,
	<tony.luck@...el.com>, Jiang Liu <jiang.liu@...wei.com>,
	<qiuxishi@...wei.com>, <bessel.wang@...wei.com>,
	<wujianguo@...wei.com>, <paul.gortmaker@...driver.com>,
	<kamezawa.hiroyu@...fujitsu.com>, <kosaki.motohiro@...fujitsu.com>,
	<rientjes@...gle.com>, Minchan Kim <minchan@...nel.org>,
	<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
	Wen Congyang <wency@...fujitsu.com>
Subject: Re: [PATCH RESEND] memory hotplug: fix a double register section
 info bug

2012/09/15 5:14, Andrew Morton wrote:
> On Fri, 14 Sep 2012 20:00:09 +0900
> Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com> wrote:
>
>>> @@ -187,9 +184,10 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
>>>    	end_pfn = pfn + pgdat->node_spanned_pages;
>>>
>>>    	/* register_section info */
>>> -	for (; pfn < end_pfn; pfn += PAGES_PER_SECTION)
>>> -		register_page_bootmem_info_section(pfn);
>>> -
>>> +	for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
>>> +		if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
>>
>> I cannot judge whether your configuration is correct or not.
>> Thus if it is correct, I want a comment of why the node check is
>> needed. In usual configuration, a node does not span the other one.
>> So it is natural that "pfn_to_nid(pfn) is same as "pgdat->node_id".
>> Thus we may remove the node check in the future.
>
> yup.  How does this look?

Looks good to me.

Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>

>
> --- a/mm/memory_hotplug.c~memory-hotplug-fix-a-double-register-section-info-bug-fix
> +++ a/mm/memory_hotplug.c
> @@ -185,6 +185,12 @@ void register_page_bootmem_info_node(str
>
>   	/* register_section info */
>   	for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
> +		/*
> +		 * Some platforms can assign the same pfn to multiple nodes - on
> +		 * node0 as well as nodeN.  To avoid registering a pfn against
> +		 * multiple nodes we check that this pfn does not already
> +		 * reside in some other node.
> +		 */
>   		if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
>   			register_page_bootmem_info_section(pfn);
>   	}
> _
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
>


--
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