Re: [tip:x86/urgent] x86: add boundary check for 32bit res beforeexpand e820 resource to alignment

From: Yinghai Lu
Date: Fri Jul 03 2009 - 03:02:36 EST


Ingo Molnar wrote:
> * tip-bot for Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>
>> Commit-ID: 4b05c392955458757790414bd7ba4280e1a515b0
>> Gitweb: http://git.kernel.org/tip/4b05c392955458757790414bd7ba4280e1a515b0
>> Author: Yinghai Lu <yinghai@xxxxxxxxxx>
>> AuthorDate: Thu, 2 Jul 2009 11:10:56 -0700
>> Committer: H. Peter Anvin <hpa@xxxxxxxxx>
>> CommitDate: Thu, 2 Jul 2009 11:53:15 -0700
>>
>> x86: add boundary check for 32bit res before expand e820 resource to alignment
>>
>> Avoid incorrect address arithmetic, ascerbated by previous improper
>> definition of the round_up() macro.
>>
>> fix hang with HIGHMEM_64G and 32bit resource.
>> according to hpa and Linus, use (resource_size_t)-1 to fend off big ranges.
>> analyized by hpa
>>
>> Alex found:
>> for i386 machine the specjbb2005 still can not run with hugepage
>>
>> -v2: it also fix hugepage problem
>>
>> Reported-and-tested-by: Mikael Pettersson <mikpe@xxxxxxxx>
>> Reported-and-Tested-by: Alex Shi <alex.shi@xxxxxxxxx>
>> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
>> Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxx>
>
> Peter, Yinghi - i zapped this and the other e820 patch from
> x86/urgent as Linus already applied slightly different versions
> upstream:
>
> 7c5371c: x86: add boundary check for 32bit res before expand e820 resource to alignment

the same, only comments is different.

> 4364467: x86: fix power-of-2 round_up/round_down macros
more safe.

do we need to move it include/linux/kernel.h ?

YH


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/