From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756082AbcCBRyE (ORCPT ); Wed, 2 Mar 2016 12:54:04 -0500 Received: from torg.zytor.com ([198.137.202.12]:42972 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752103AbcCBRyC (ORCPT ); Wed, 2 Mar 2016 12:54:02 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <20160302162530.GA8362@pd.tnic> References: <1456917606-4979-1-git-send-email-bp@alien8.de> <20160302162530.GA8362@pd.tnic> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC PATCH] x86: Make sure verify_cpu has a good stack From: "H. Peter Anvin" Date: Wed, 02 Mar 2016 09:53:28 -0800 To: Borislav Petkov , Brian Gerst CC: X86 ML , LKML , Tom Lendacky Message-ID: <086BE61B-DCCC-4105-90A2-295A487C7F6F@zytor.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On March 2, 2016 8:25:30 AM PST, Borislav Petkov wrote: >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. Please explain why we can't use rip-relative addressing in some form... -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.