Skip to contentSkip to conversation

x86: add boundary check for 32bit res before expand e820 resource to alignment

tip:x86/urgent Ingo Molnar 2 participants 2 messages Jul 3, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 19 lines · tip-bot for Yinghai Lu
Commit-ID:  4b05c392955458757790414bd7ba4280e1a515b0
Gitweb:     http://git.kernel.org/tip/4b05c392955458757790414bd7ba4280e1a515b0
Author:     Yinghai Lu <[email protected]>
AuthorDate: Thu, 2 Jul 2009 11:10:56 -0700
Committer:  H. Peter Anvin <[email protected]>
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

Quoted 6 lines

-v2: it also fix hugepage problem

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 4364467: x86: fix power-of-2 round_up/round_down macros

Mind checking what the differences are and queue up any deltas that might still be needed?

Thanks,

Ingo

#2 lore raw
Quoted 28 lines · Ingo Molnar
Quoted 19 lines · tip-bot for Yinghai Lu
Commit-ID:  4b05c392955458757790414bd7ba4280e1a515b0
Gitweb:     http://git.kernel.org/tip/4b05c392955458757790414bd7ba4280e1a515b0
Author:     Yinghai Lu <[email protected]>
AuthorDate: Thu, 2 Jul 2009 11:10:56 -0700
Committer:  H. Peter Anvin <[email protected]>
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

Quoted 6 lines

-v2: it also fix hugepage problem

Quoted 5 lines

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.

Quoted 1 line

4364467: x86: fix power-of-2 round_up/round_down macros

more safe.

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

YH