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:	Sat, 30 Mar 2013 00:42:14 +0800
From:	Jiang Liu <liuj97@...il.com>
To:	Sam Ravnborg <sam@...nborg.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	David Rientjes <rientjes@...gle.com>,
	Jiang Liu <jiang.liu@...wei.com>,
	Wen Congyang <wency@...fujitsu.com>,
	Mel Gorman <mgorman@...e.de>, Minchan Kim <minchan@...nel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Michal Hocko <mhocko@...e.cz>,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	David Howells <dhowells@...hat.com>,
	Mark Salter <msalter@...hat.com>,
	Jianguo Wu <wujianguo@...wei.com>, linux-mm@...ck.org,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	Tang Chen <tangchen@...fujitsu.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
Subject: Re: [PATCH v3, part4 38/39] mm/hotplug: prepare for removing num_physpages

On 03/30/2013 12:40 AM, Sam Ravnborg wrote:
> On Sat, Mar 30, 2013 at 12:30:14AM +0800, Jiang Liu wrote:
>> On 03/30/2013 12:17 AM, Sam Ravnborg wrote:
>>>>>> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
>>>>>> index 97454b3..9b1b494 100644
>>>>>> --- a/mm/memory_hotplug.c
>>>>>> +++ b/mm/memory_hotplug.c
>>>>>> @@ -751,10 +751,6 @@ EXPORT_SYMBOL_GPL(restore_online_page_callback);
>>>>>>  
>>>>>>  void __online_page_set_limits(struct page *page)
>>>>>>  {
>>>>>> -	unsigned long pfn = page_to_pfn(page);
>>>>>> -
>>>>>> -	if (pfn >= num_physpages)
>>>>>> -		num_physpages = pfn + 1;
>>>>>>  }
>>>>>>  EXPORT_SYMBOL_GPL(__online_page_set_limits);
>>>>>
>>>>> How can this be correct?
>>>>> With this change __online_page_set_limits() is now a nop.
>>>> Hi Sam,
>>>> 	We will eventually remove the global variable num_physpages in the last patch.
>>>> I kept the nop __online_page_set_limits() because I have a plan to use it to fix other
>>>> bugs in memory hotplug, otherwise it may be killed too.
>>>
>>> The xen ballon driver uses __online_page_set_limits for memory
>>> hotplug - so this will break this driver afaics.
>> Hi Sam,
>> 	I haven't gotten your point yet here. 
>> 	Function __online_page_set_limits() was only used to update the global variable
>> num_physpages, and one of the goals of this patch set is to get rid of num_physpages.
>> So I think it won't break Xen balloon driver.
>> 	Please refer to the patch here, which eventually kills num_physpages.
>> http://marc.info/?l=linux-mm&m=136431387813309&w=2
> 
> I assumed that num_physpages was used run-time to check for the
> available number of pages. And __online_page_set_limits() were used
> to reduced the number of online pages.
> 
> But a quick grep did not reveal any such use.
> 
> So it looks OK - thanks for the clarification.
Yeah, we have a patch to replace num_physpages with totalram_pages for runtime access,
please refer to:
http://marc.info/?l=linux-mm&m=136431351413052&w=2

> 
> 	Sam
> 

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