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]
Message-ID: <03d44563-3860-052b-1c49-e81208bdd697@linaro.org>
Date:	Wed, 25 May 2016 15:36:48 -0700
From:	"Shi, Yang" <yang.shi@...aro.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linaro-kernel@...ts.linaro.org
Subject: Re: [PATCH] mm: use early_pfn_to_nid in
 register_page_bootmem_info_node

On 5/25/2016 3:23 PM, Andrew Morton wrote:
> On Wed, 25 May 2016 14:00:07 -0700 Yang Shi <yang.shi@...aro.org> wrote:
>
>> register_page_bootmem_info_node() is invoked in mem_init(), so it will be
>> called before page_alloc_init_late() if CONFIG_DEFERRED_STRUCT_PAGE_INIT
>> is enabled. But, pfn_to_nid() depends on memmap which won't be fully setup
>> until page_alloc_init_late() is done, so replace pfn_to_nid() by
>> early_pfn_to_nid().
>
> What are the runtime effects of this fix?

I didn't experience any problem without the fix. During working on the 
page_ext_init() fix (replace to early_pfn_to_nid()), I added printk 
before each pfn_to_nid() calls to check which one might be called before 
page_alloc_init_late(), then this one is caught.

 From the code perspective, it sounds not right since 
register_page_bootmem_info_section() may miss some pfns when 
CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, just like the problem 
happened in page_ext_init().

Thanks,
Yang


>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ