Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755624AbcCBQZi (ORCPT ); Wed, 2 Mar 2016 11:25:38 -0500 Received: from mail.skyhub.de ([78.46.96.112]:57108 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754849AbcCBQZg (ORCPT ); Wed, 2 Mar 2016 11:25:36 -0500 Date: Wed, 2 Mar 2016 17:25:30 +0100 From: Borislav Petkov To: Brian Gerst Cc: "H. Peter Anvin" , X86 ML , LKML , Tom Lendacky Subject: Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack Message-ID: <20160302162530.GA8362@pd.tnic> References: <1456917606-4979-1-git-send-email-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 604 Lines: 20 On Wed, Mar 02, 2016 at 11:22:30AM -0500, Brian Gerst wrote: > This should be: movq stack_start(%rip), %rsp No it wouldn't. That doesn't work. > > + subq $__START_KERNEL_map, %rsp > > It would be better to add the offset to the initializer for > stack_start instead of adjusting it at runtime. That would require > moving the existing load of stack_start from the common path to the > secondary startup, This is the BSP we're talking about - no secondary startup. We want to run verify_cpu as early as possible. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.