Re: [PATCH v6 01/27] x86, mm: Fix page table early allocation offsetchecking

From: Borislav Petkov
Date: Wed Dec 19 2012 - 12:16:20 EST

On Tue, Dec 18, 2012 at 07:30:06PM -0800, Yinghai Lu wrote:
> change that too:
> ---
> Subject: [PATCH] x86, mm: Fix page table early allocation offset checking
> During debug load kernel above 4G, found one page if is not used in BRK
> and it should be with early page allocation.
> pgt_buf_top is address that can not be used, so should check if then new
> end is above than that top, otherwise last page will not used.

Oh oh, I'm starting to slowly see the light. :-) You mean that at least
on 64-bit, we're calling alloc_low_pages with num=1 and the comparison
">=" is wrong because in that case we fall back to memblock allocation
even if we have the last page in BRK and can use it, correct?

If so, why don't you write the commit message like this instead:

"pgt_buf_top is the top BRK address which can not be used. We check
it before falling back to memblock allocation. However, the check to
fallback is wrongly off-by-one, leading to us not using the last BRK
page. However, we should do so, so fix that."

Makes sense?

[ â ]

> I really hate pr_debug.
> pr_debug is useless. it will not print out anything.

Ok, I agree, pr_debug can mean different things depending on .config



Sent from a fat crate under my desk. Formatting is fine.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at