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: <alpine.DEB.2.00.1109081616450.12963@kaball-desktop>
Date:	Thu, 8 Sep 2011 16:21:14 +0100
From:	Stefano Stabellini <stefano.stabellini@...citrix.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
CC:	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Tejun Heo <tj@...nel.org>,
	Yinghai Lu <yinghai@...nel.org>,
	Stephen Wilson <wilsons@...rt.ca>
Subject: Re: [PATCH x86,mm]  fix pgt_buf_end when memory hotplug

On Thu, 8 Sep 2011, Lai Jiangshan wrote:
> 
> When I test memory hotplug, such message is always outputted when hot-adding
> a memory block:
> 
> initial kernel pagetable allocation wasted ffffffffffffffff pages

I take you are using tip/x86/mm, because that is the only branch that
contains that warning.


> This message comes from init_memory_mapping(), it shows "pgt_buf_end" is
> incorrect here, and I found it was caused by alloc_low_page().
> 
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> ---
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index bbaaa00..e138e0a 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -317,7 +317,7 @@ void __init cleanup_highmap(void)
>  
>  static __ref void *alloc_low_page(unsigned long *phys)
>  {
> -	unsigned long pfn = pgt_buf_end++;
> +	unsigned long pfn;
>  	void *adr;
>  
>  	if (after_bootmem) {
> @@ -327,6 +327,7 @@ static __ref void *alloc_low_page(unsigned long *phys)
>  		return adr;
>  	}
>  
> +	pfn = pgt_buf_end++;
>  	if (pfn >= pgt_buf_top)
>  		panic("alloc_low_page: ran out of memory");


This patch makes sense to me. It would also make sense to print the
"allocation wasted" warning only if (!after_bootmem).
--
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