Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751828AbdLARGg (ORCPT ); Fri, 1 Dec 2017 12:06:36 -0500 Received: from mga09.intel.com ([134.134.136.24]:62563 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdLARGe (ORCPT ); Fri, 1 Dec 2017 12:06:34 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,346,1508828400"; d="scan'208";a="11941568" Subject: Re: [PATCH 16/21] x86/entry/64: Use a per-CPU trampoline stack for IDT entries To: Ingo Molnar , linux-kernel@vger.kernel.org References: <20171127104529.12435-1-mingo@kernel.org> <20171127104529.12435-17-mingo@kernel.org> Cc: Andy Lutomirski , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , Borislav Petkov , Linus Torvalds From: Dave Hansen Message-ID: <305ed448-6f8e-eecd-d120-546efc185443@linux.intel.com> Date: Fri, 1 Dec 2017 09:06:32 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171127104529.12435-17-mingo@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1884 Lines: 30 On 11/27/2017 02:45 AM, Ingo Molnar wrote: > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -1645,11 +1645,13 @@ void cpu_init(void) > setup_cpu_entry_area(cpu); > > /* > - * Initialize the TSS. Don't bother initializing sp0, as the initial > - * task never enters user mode. > + * Initialize the TSS. sp0 points to the entry trampoline stack > + * regardless of what task is running. > */ > set_tss_desc(cpu, &get_cpu_entry_area(cpu)->tss.x86_tss); > load_TR_desc(); > + load_sp0((unsigned long)&get_cpu_entry_area(cpu)->tss + > + offsetofend(struct tss_struct, SYSENTER_stack)); > > load_mm_ldt(&init_mm); Does this also mean that our stack dumps will say "" in oopses? > [ 30.811750] CR2: fffffffffdeb2f98 CR3: 0000000423fae001 CR4: 00000000001607e0 > [ 30.819712] Call Trace: > [ 30.822442] > [ 30.825170] trace_hardirqs_on_thunk+0x1c/0x1c ... > [ 31.000571] R13: 0000000000000050 R14: 0000000000000076 R15: 00007f59f76f2d60 > [ 31.008533] Should we change that string to something more descriptive?