[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Mar 2016 18:50:21 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Borislav Petkov <bp@...en8.de>, Brian Gerst <brgerst@...il.com>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack
On Wed, Mar 2, 2016 at 5:00 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Wed, Mar 2, 2016 at 4:13 PM, Yinghai Lu <yinghai@...nel.org> wrote:
>> On Wed, Mar 2, 2016 at 2:32 PM, H. Peter Anvin <hpa@...or.com> 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.
>>
>> Why do we need to call verify_cpu in arch/x86/kernel/head_64.S aka the
>> vmlinux again ?
>>
>> Is that already called in arch/x86/boot/compressed/head_64.S?
>
> that calling is from startup_32, so may add another calling in startup_64,
> so can avoid calling from arch/x86/kernel/head_64.S
>
at the same time, the "call verify_cpu" in
arch/x86/kernel/head_64.s::secondary_startup_64()
is not needed.
As APs already go through
arch/x86/realmode/rm/trampoline_64.S::trampoline_start(), and it
already
call verify_cpu in 16bit mode.
Thanks
Yinghai
Powered by blists - more mailing lists