Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348292
| From | Mika Penttilä <mika.penttila@nextfour.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack |
| Date | 2016-03-02 17:20 +0100 |
| Message-ID | <r8hFi-1CS-41@gated-at.bofh.it> (permalink) |
| References | <r8d8C-6UP-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02.03.2016 13:20, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> 04633df0c43d ("x86/cpu: Call verify_cpu() after having entered long mode too")
> added the call to verify_cpu() for sanitizing CPU configuration.
>
> The latter uses the stack minimally and it can happen that we land in
> startup_64() directly from a 64-bit bootloader. Then we want to use our
> own, known good stack.
>
> Do that.
>
> APs don't need this as the trampoline sets up a stack for them.
>
> Reported-by: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> arch/x86/kernel/head_64.S | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
> index 22fbf9df61bb..d60a044c2fdc 100644
> --- a/arch/x86/kernel/head_64.S
> +++ b/arch/x86/kernel/head_64.S
> @@ -64,6 +64,10 @@ startup_64:
> * tables and then reload them.
> */
>
> + /* Setup a stack for verify_cpu */
> + movq stack_start - __START_KERNEL_map, %rsp
> + subq $__START_KERNEL_map, %rsp
> +
You subtract __START_KERNEL_map twice ?
--Mika
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 12:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 17:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Mika Penttilä <mika.penttila@nextfour.com> - 2016-03-02 17:40 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 18:00 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Mika Penttilä <mika.penttila@nextfour.com> - 2016-03-02 18:50 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Mika Penttilä <mika.penttila@nextfour.com> - 2016-03-02 17:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 17:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 19:00 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 19:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 19:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 19:40 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 21:00 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 21:50 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 22:40 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 22:50 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 23:00 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 23:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 23:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-02 23:40 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 23:50 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Yinghai Lu <yinghai@kernel.org> - 2016-03-03 01:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Yinghai Lu <yinghai@kernel.org> - 2016-03-03 02:10 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Yinghai Lu <yinghai@kernel.org> - 2016-03-03 04:00 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-03 13:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-03 16:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-03 17:40 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-03 21:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-03 22:00 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack "H. Peter Anvin" <hpa@zytor.com> - 2016-03-03 22:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-03 22:40 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Yinghai Lu <yinghai@kernel.org> - 2016-03-04 02:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Yinghai Lu <yinghai@kernel.org> - 2016-03-04 03:30 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Borislav Petkov <bp@alien8.de> - 2016-03-02 23:20 +0100
Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Brian Gerst <brgerst@gmail.com> - 2016-03-02 17:30 +0100
csiph-web