From patchwork Wed Jul 11 11:29:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 10519405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA0056032A for ; Wed, 11 Jul 2018 11:30:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE6A28B70 for ; Wed, 11 Jul 2018 11:30:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCC3E28D38; Wed, 11 Jul 2018 11:30:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE9F528B70 for ; Wed, 11 Jul 2018 11:30:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E8C936B026B; Wed, 11 Jul 2018 07:30:03 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E61B86B026D; Wed, 11 Jul 2018 07:30:03 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D03066B026E; Wed, 11 Jul 2018 07:30:03 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 716516B026B for ; Wed, 11 Jul 2018 07:30:03 -0400 (EDT) Received: by mail-ed1-f70.google.com with SMTP id g16-v6so9878559edq.10 for ; Wed, 11 Jul 2018 04:30:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=opAd4Eid3zHX0WzEV+LiCU/V34V1ZvRgQLnBaOSWQG4=; b=ihbDrz9xtQjSqHS8qPiM1J8Ys2N9ZaW9OEcRmthQLmXuLtrPfaOCMyORU4n1BgszLP DHJhJLDI2vZsPe7+Kk/JJWx3ezw4OMjPJCW5aj4pgxNHdz7GMooX3NfkI9vwRkTL/wB6 3OUmKm1SkL0Q9N7zGWWohYZ9W31lfMlO0Qu2nop8J6uhkCS3au81lP0lquApG3DMVkxw MqaKkaTBBp8G76Lzg79nU8tg+tOKITfEEtj6HvHifm2ctk3D17Xg5XHkNb6LRpHSiMBd JOzE+l/4pSPoaVQjXps3LKcDWoAp0ERW07Af3JXXv7vHEgh9/+vZXKpKPaH91Nu5HBvi ZV7Q== X-Gm-Message-State: APt69E0n8GoJ90nJtBMRGPPPkbLnPU0w2CRr9v1S/bBRYYbU+JGdwcr/ JZrGqAgUns79j9CDNdhDqLSoBC3AX6GFjuvXuczc5OBWL0TsA1LdlPoUqRKlt0YeSUzlsXjW4gz dlzLZPEX+OTTuVyTqZhCda2RsQfekC/gCcrXfLjhas51sKDd+zjGPd5RCshatqnMZQQ== X-Received: by 2002:a50:f18c:: with SMTP id x12-v6mr31448815edl.59.1531308602829; Wed, 11 Jul 2018 04:30:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdd1dY9uk4ukc5KqWjuhtftlypHlF4c3ud7L8fNUbJUpVEulkBrTA+VQCmF2sAr22AqUf4y X-Received: by 2002:a50:f18c:: with SMTP id x12-v6mr31448775edl.59.1531308602134; Wed, 11 Jul 2018 04:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531308602; cv=none; d=google.com; s=arc-20160816; b=xVMHUu78/GxLzfnIYtmDpQT1XOwuanToxua47QnLEIRcHo37kgukDNoqz4HGEzjbkV TYEmnRo2GxNZVL1Iz+jzDXamRjEELeEGce66xbFDmrHP79Z4AO0ORHTEofkyb6eHY60t LjgnJOemVar/ljw2MmisbpUsRDeuiOJN8Z9Lp2tuD5KEYc8yyyNAoVm7Oi+3/MWjFng/ QfNBciWW1kv1yDZtXY3HNwzgEi7GClt84UqJxzjURt4lMMYuILXz4D+CbtyRAKzuhvdO o0clgQAymlAns6DrP3REa08z4+biUcCNBRbAzt5cTGq1fD1Pw7GCTI20GuKlFwFAfaA+ Vv6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=opAd4Eid3zHX0WzEV+LiCU/V34V1ZvRgQLnBaOSWQG4=; b=pZ6Lekk8+OIBygjxkmkZJIdQn1Q//xu3XtMhuGIz9MWJgAxcHCqeiQlxAd9Uelumie Q1Y7mHwAQcbQWGmboSN0VbJadjWTeDMhr2T8m7Rgejn7pX5LanNuLPEEs9T3/I/tsx2u pfyYdcMOGxHloGJHHFNDHdsUjYN1SD1E7bmFW+aKe3CosInprCoPbGRbFFNZs3HyocgZ 69AkDcOLLmgUIOQwFYLgMF+FhgdWy+qENKBCgO1/NaU+JuFutFf3eEp4yRCMp+oIawhM EsYkk0KefDnK13uHCtQtuXx5JdUB0IGmg2frYL54oSk/JzVEycx9b55lLea3REmdYMCL ZDVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=djVDfhph; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: from theia.8bytes.org (8bytes.org. [81.169.241.247]) by mx.google.com with ESMTPS id j23-v6si3767250edp.51.2018.07.11.04.30.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 04:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) client-ip=81.169.241.247; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@8bytes.org header.s=mail-1 header.b=djVDfhph; spf=pass (google.com: domain of joro@8bytes.org designates 81.169.241.247 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: by theia.8bytes.org (Postfix, from userid 1000) id 4D2F425A; Wed, 11 Jul 2018 13:29:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1531308599; bh=cksQHxcNzj3+gU6z5n33f/sFXT1frvFLb6++fPVFFxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=djVDfhphKC3dT17XlxFI0Gk+gWe3e6xUDnmlPvMHx0MU+72+lToBo6wLgfZrnzyAB TPo+kc1+1O9pF0DFqQbqO6XfA1GXGsuJ77V3uNh3oPN0IqJKl4nYx89bPWwp09tNuy YB7+0YNOxpECdnlHOFNvQHE6KWTJs2QZiR0WCOQyr+IOJzE6qCR77jzNg5xMEIasY+ O5+QYkMx4nJBU8Vhn1Xchiq++p9aH2K4sA2QZOXs+ojsUapAVKQDWHN9io3OMq4/Bs jo9Mzb2dTW+RMO/3YCCv1420HyjsISu8gAgO8WYh/1EzKFFY+RWHpX2swQUkhpCG05 uep8tTKYA8koQ== 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 , "David H . Gutteridge" , jroedel@suse.de, joro@8bytes.org Subject: [PATCH 02/39] x86/entry/32: Rename TSS_sysenter_sp0 to TSS_entry_stack Date: Wed, 11 Jul 2018 13:29:09 +0200 Message-Id: <1531308586-29340-3-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531308586-29340-1-git-send-email-joro@8bytes.org> References: <1531308586-29340-1-git-send-email-joro@8bytes.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andy Lutomirski --- 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 c371bfe..39fdda3 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -412,7 +412,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 a4a3be3..ab2d949 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_STACKPROTECTOR