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:	Tue, 19 Jun 2012 14:26:18 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Gavin Shan <shangw@...ux.vnet.ibm.com>
Cc:	Sasha Levin <levinsasha928@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>, hpa@...ux.intel.com,
	linux-mm <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Early boot panic on machine with lots of memory

On Tue, Jun 19, 2012 at 02:20:59PM -0700, Tejun Heo wrote:
> Something like the following should fix it.
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 32a0a5e..2770970 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -148,11 +148,15 @@ phys_addr_t __init_memblock memblock_find_in_range(phys_addr_t start,
>   */
>  int __init_memblock memblock_free_reserved_regions(void)
>  {
> +#ifndef CONFIG_DEBUG_PAGEALLOC
>  	if (memblock.reserved.regions == memblock_reserved_init_regions)
>  		return 0;
>  
>  	return memblock_free(__pa(memblock.reserved.regions),
>  		 sizeof(struct memblock_region) * memblock.reserved.max);
> +#else
> +	return 0;
> +#endif

BTW, this is just ugly and I don't think we're saving any noticeable
amount by doing this "free - give it to page allocator - reserve
again" dancing.  We should just allocate regions aligned to page
boundaries and free them later when memblock is no longer in use.

Thanks.

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