Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack

From: Borislav Petkov
Date: Wed Mar 02 2016 - 17:40:58 EST


On Wed, Mar 02, 2016 at 02:32:54PM -0800, H. Peter Anvin wrote:
> I'm trying to think of any reason why we couldn't simply have a symbol
> at the top of the initial stack? Then a simple leaq would suffice;
> this is for the BSP after all.

That should be simpler. And we do games like that already in the trampoline:

# Setup stack
movl $rm_stack_end, %esp

...

GLOBAL(rm_stack)
.space 2048
GLOBAL(rm_stack_end)

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.