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]
Message-ID: <Pine.LNX.4.64.0704241100440.1067@skynet.skynet.ie>
Date:	Tue, 24 Apr 2007 11:09:29 +0100 (IST)
From:	Mel Gorman <mel@....ul.ie>
To:	Yasunori Goto <y-goto@...fujitsu.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>, tony.luck@...el.com,
	Linux Kernel ML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]Fix parsing kernelcore boot option for ia64

On Tue, 24 Apr 2007, Yasunori Goto wrote:

>
>
>> Subject: Check zone boundaries when freeing bootmem
>> Zone boundaries do not have to be aligned to MAX_ORDER_NR_PAGES.
>
> Hmm. I don't understand here yet... Could you explain more?
>

Nodes are required to be MAX_ORDER_NR_PAGES aligned for the buddy 
algorithm to work but zones can be at any alignment because the 
page_is_buddy() check checks the zone_id of two buddies when merging. As 
zones are generally aligned anyway, it was never noticed that the bootmem 
allocators assumes zones are at least order-5 aligned on 32 bit and 
order-6 aligned on 64 bit.

> This issue occurs only when ZONE_MOVABLE is specified.

Yes, because it can be sized to any value. At the moment, zones are 
aligned to MAX_ORDER_NR_PAGES so it was not noticed that bootmem makes 
assumptions on zone alignment.

> If its boundary is aligned to MAX_ORDER automatically,
> I guess user will not mind it.
>

Probably not. They will get a different amount of memory usable by the 
kernel than they asked for but it doesn't really matter. Huge pages 
generally need MAX_ORDER_NR_PAGES base pages as well so the alignment 
doesn't hurt there.

> From memory hotplug view, I prefer section size alignment to make
> simple code. :-P
>

That's fair. I'll roll up a patch that aligns to MAX_ORDER_NR_PAGES to 
begin with and then decide if it should align to section size on SPARSEMEM 
or not.

>
>> However,
>> during boot, there is an implicit assumption that they are aligned to a
>> BITS_PER_LONG boundary when freeing pages as quickly as possible. This
>> patch checks the zone boundaries when freeing pages from the bootmem allocator.
>
> Anyway, the patch works well.
>

Right, I'll resend it to linux-mm as a standalone patch later so because 
it fixes a correctness issue albeit one that is easily avoided.

> Bye.
>

Thanks

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
-
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