]> git.baikalelectronics.ru Git - kernel.git/commit
x86 setup: guard the heap against invalid stack setups
authorH. Peter Anvin <hpa@zytor.com>
Wed, 30 Jan 2008 12:33:04 +0000 (13:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:33:04 +0000 (13:33 +0100)
commit438cb0fbd2d54471df969079469b9753850a7e6c
tree9fcea88cca70b60efa8d49b9e3a11a43408a7449
parent1f18f1fa809a2974c000f1a2c8b2a1ca786fc055
x86 setup: guard the heap against invalid stack setups

If we use the bootloader-provided stack pointer, we might end up in a
situation where the bootloader (incorrectly) pointed the stack in the
middle of our heap.  Catch this by simply comparing the computed heap
end value to the stack pointer minus the defined stack size.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/boot/main.c