Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack
From: Borislav Petkov
Date: Wed Mar 02 2016 - 15:46:32 EST
On Wed, Mar 02, 2016 at 08:50:53PM +0100, Borislav Petkov wrote:
> But better safe than sorry.
I got this, it looks good when I'm single-stepping through it with gdb
and it boots fine in kvm. I'll run it on baremetal tomorrow:
/*
* Setup stack for verify_cpu(): make sure we don't clobber a valid
* stack pointer by using temporary registers.
*/
movq stack_start(%rip), %rax
movq $__START_KERNEL_map, %rdx
subq %rdx, %rax
movq %rax, %rsp
Thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.