Received: by 10.223.185.116 with SMTP id b49csp2469568wrg; Mon, 5 Mar 2018 03:31:55 -0800 (PST) X-Google-Smtp-Source: AG47ELuHVxzpM8Yeht3C342CAb4x+UdtaTlfjyvtoLa9LpwaSPv3Ka8Xd4Yg/INVvVKLDZ2VskOh X-Received: by 2002:a17:902:6ecf:: with SMTP id l15-v6mr12871668pln.443.1520249515024; Mon, 05 Mar 2018 03:31:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520249514; cv=none; d=google.com; s=arc-20160816; b=twOToTfU5YkLgJn9+wTPgeqHnfhtGjOjXHEILBlPBpCxvLovGtDL+Du8UEVvnbpMxe 41Z0s82A9UdhUt5UfKnrcYh05jVYDXX68CPiqaok1wKmvIxKL2tLkSjI7Z7iUdOR1ZxE w+rQgGP44nP8nkyhdkC/LGiK0hp0aVfasSH5iMaC64pVKp2ZvTqePn8dDM6lf5g6BotC lDQ2PuO1Ig8GYAXGoHwBvIL+VpaacZD1tKIFoJzRjpq6VmZbTMkX56DOaCQJOAyUJL60 DABe6Y/zPXj4abPt4pdBbZ/OEMdfLHjAeSWoTWZL/8+ojDeSyaaImD8lUbFVzuzEXt8i tA6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=hdsRAwqz5z3IOtY48u7JLP4JHKEq8P0HRQlMJ07/mYo=; b=V2fupzRq9IkNgqLcrRt2jJZkEG8uMgj3Qi1x9eBGzgw0GSnUpSeVUP5556bBcQcmJC DIrbQZI7GxQN2hnkk1yytIB2/USi5Ip53cz3EOAwmH5EO5rzlxUZUNxTIu1Ldn2sJLiV lFIk5eHLx5Ji6PkUDoBFkcsvAyVc656GEQH1P0NgjM6JTGEJdKIAXu2GBhYIUlpuxosZ WwJI4gHJ31lulGnC9YxX4JUCfKuiUbe5LnTxEFZVxdjnjKr45dUfxVLlHzSB9B3Ie8vS CyVNKQdhjRzU/Dm+1D8Jdv/eN5H3t/7gdegjg8f+f7Gep+1mJSPWM9+UZl9gAoaSs9yc 3c2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=IGx/dwWr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4si10075741pfa.152.2018.03.05.03.31.39; Mon, 05 Mar 2018 03:31:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=IGx/dwWr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933868AbeCEK0b (ORCPT + 99 others); Mon, 5 Mar 2018 05:26:31 -0500 Received: from 8bytes.org ([81.169.241.247]:54164 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933168AbeCEK0J (ORCPT ); Mon, 5 Mar 2018 05:26:09 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 7EC8F5B8; Mon, 5 Mar 2018 11:26:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1520245565; bh=bPagKXBI+qN+KmQFc9vJMGfhnmRoEvcD9clogL8+bDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IGx/dwWr38CMIhtwbwPJ6qINLGiv155mcC1xjkBuSq5XQm/S0iKXmCloIa8Pebq6B PbHe8x45SxXbW8LnpV+owE0+dDi3UPUeVKVstE6daawvhKHcvHfbxMDpP/8vQ/tbBV 6N90c/fPhvAzetgV6IrdJ7HwmQ/FUAKiTFAx6J/MAikBnjXIJBs5lpdiFoBJRCaRVE 9+MGjOrc5UnLi6Ee13FQtxJIO8NXXzgNy53EfwCldD4mBEY4vcnBTnXDvc9zloBf6d KbHUESITfGyRAlJccu2SbPgnkQ7xM+kUA+JThuRy8mSGaIOzthIzDya8MUAlIImATZ LKS0xtSncQN3Q== From: Joerg Roedel To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , jroedel@suse.de, joro@8bytes.org Subject: [PATCH 02/34] x86/entry/32: Rename TSS_sysenter_sp0 to TSS_entry_stack Date: Mon, 5 Mar 2018 11:25:31 +0100 Message-Id: <1520245563-8444-3-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520245563-8444-1-git-send-email-joro@8bytes.org> References: <1520245563-8444-1-git-send-email-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel The stack address doesn't need to be stored in tss.sp0 if we switch manually like on sysenter. Rename the offset so that it still makes sense when we change its location. We will also use this stack for all kernel-entry points, not just sysenter. Reflect that in the name as well. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 2 +- arch/x86/kernel/asm-offsets_32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 2a35b1e..e659776 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -413,7 +413,7 @@ ENTRY(xen_sysenter_target) * 0(%ebp) arg6 */ ENTRY(entry_SYSENTER_32) - movl TSS_sysenter_sp0(%esp), %esp + movl TSS_entry_stack(%esp), %esp .Lsysenter_past_esp: pushl $__USER_DS /* pt_regs->ss */ pushl %ebp /* pt_regs->sp (stashed in bp) */ diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c index fa1261e..f452bfd 100644 --- a/arch/x86/kernel/asm-offsets_32.c +++ b/arch/x86/kernel/asm-offsets_32.c @@ -47,7 +47,7 @@ void foo(void) BLANK(); /* Offset from the sysenter stack to tss.sp0 */ - DEFINE(TSS_sysenter_sp0, offsetof(struct cpu_entry_area, tss.x86_tss.sp0) - + DEFINE(TSS_entry_stack, offsetof(struct cpu_entry_area, tss.x86_tss.sp0) - offsetofend(struct cpu_entry_area, entry_stack_page.stack)); #ifdef CONFIG_CC_STACKPROTECTOR -- 2.7.4