Message ID | 4fdb800ce6f1a2315918cb02eec3efbec1032cb8.1682673543.git.houwenlong.hwl@antgroup.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp816468vqo; Fri, 28 Apr 2023 03:02:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GthAiyygmBaq19/l70C+kWBM1Ra43MuKLT5sANPgn1mBu2fibFRWBUu15GD3+VgmjoqAT X-Received: by 2002:a05:6a20:7da6:b0:f8:ea21:7c37 with SMTP id v38-20020a056a207da600b000f8ea217c37mr3712045pzj.20.1682676149906; Fri, 28 Apr 2023 03:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682676149; cv=none; d=google.com; s=arc-20160816; b=NLc0anSyx9kluiddd6SBgAbYXbKxhR8hweuq1GEEIBcLDvi2DaaKaJ0cf/mL+E4E3l yT24aknaqGCxO2wNa9LVEOvdFzZZa/oHiyfZ6n2j9jToICn0YsOKNk+QA3WjMCaBMtfu NL52x+YPFGWuF7w75t+Sjc85b1Fcxhlc1suJTSFQrnKTOuwPOBe0qDt9jVNtwwskOWZl xkPrmNlHjzsg1k9wVS2JvfGW8pq17mMrUSSe2+7hpCK3C7Sn10Now5liRfOwX8k/DTnO pvQh5hPg/z5bEtnzRh3QEUfgkprqWZcMY9M5ChjOVeQiKYN4kzca6YubCO8yPtmende8 P1NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yYc0n90JYFI54S7MPf98HJFG7zj7m02alVcdXoyA3Nw=; b=cKY9aW3E6n+r+l4X2QIB9OGw4NJeg63TiDEn3Pf2mpIFMeQoyGb8nmyhIbXWFfgNP5 x9TirxA+Cj7pFGMHT26+hvyl/oDNju1NQ6+TWAvbaxhBJZ8dyj9xA3jnKOHW3G/yH8rm ZcqGPNjdIRJk1DXel7AxA+z+kYmkxK9wuty8QVe1eZ8NWAc6FwbndZ4T3S5bHgW+DyiW gvJaaKs4NEJ65QTCZWGolO7a5GPkiUKwFcmb3g2LKlrWd5wyIUa4q+c5DboDetqmZvnW R9lVfBUiRVdSzT+0E7QShawfH2Yg7XF+fRJhiIX9xvjB1YXDyhVeUvxdaEx8YRB3KHmc cn8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v202-20020a6361d3000000b00519d4818029si21134283pgb.152.2023.04.28.03.02.16; Fri, 28 Apr 2023 03:02:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345529AbjD1Jxr (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 99 others); Fri, 28 Apr 2023 05:53:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345782AbjD1JxY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Apr 2023 05:53:24 -0400 Received: from out0-219.mail.aliyun.com (out0-219.mail.aliyun.com [140.205.0.219]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC24959F9; Fri, 28 Apr 2023 02:53:02 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047198;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---.STCEPV9_1682675548; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.STCEPV9_1682675548) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 17:52:29 +0800 From: "Hou Wenlong" <houwenlong.hwl@antgroup.com> To: linux-kernel@vger.kernel.org Cc: "Thomas Garnier" <thgarnie@chromium.org>, "Lai Jiangshan" <jiangshan.ljs@antgroup.com>, "Kees Cook" <keescook@chromium.org>, "Hou Wenlong" <houwenlong.hwl@antgroup.com>, "Juergen Gross" <jgross@suse.com>, "Boris Ostrovsky" <boris.ostrovsky@oracle.com>, "Darren Hart" <dvhart@infradead.org>, "Andy Shevchenko" <andy@infradead.org>, "Thomas Gleixner" <tglx@linutronix.de>, "Ingo Molnar" <mingo@redhat.com>, "Borislav Petkov" <bp@alien8.de>, "Dave Hansen" <dave.hansen@linux.intel.com>, <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>, <xen-devel@lists.xenproject.org>, <platform-driver-x86@vger.kernel.org> Subject: [PATCH RFC 15/43] x86/PVH: Use fixed_percpu_data to set up GS base Date: Fri, 28 Apr 2023 17:50:55 +0800 Message-Id: <4fdb800ce6f1a2315918cb02eec3efbec1032cb8.1682673543.git.houwenlong.hwl@antgroup.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <cover.1682673542.git.houwenlong.hwl@antgroup.com> References: <cover.1682673542.git.houwenlong.hwl@antgroup.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764413826564497081?= X-GMAIL-MSGID: =?utf-8?q?1764413826564497081?= |
Series |
x86/pie: Make kernel image's virtual address flexible
|
|
Commit Message
Hou Wenlong
April 28, 2023, 9:50 a.m. UTC
startup_64() and startup_xen() both use fixed_percpu_data to set up GS
base. So for consitency, use it too in PVH entry.
Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
Cc: Thomas Garnier <thgarnie@chromium.org>
Cc: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Cc: Kees Cook <keescook@chromium.org>
---
arch/x86/platform/pvh/head.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S index c4365a05ab83..b093996b7e19 100644 --- a/arch/x86/platform/pvh/head.S +++ b/arch/x86/platform/pvh/head.S @@ -96,7 +96,7 @@ SYM_CODE_START_LOCAL(pvh_start_xen) 1: /* Set base address in stack canary descriptor. */ mov $MSR_GS_BASE,%ecx - mov $_pa(canary), %eax + mov $_pa(INIT_PER_CPU_VAR(fixed_percpu_data)), %eax xor %edx, %edx wrmsr @@ -156,8 +156,6 @@ SYM_DATA_START_LOCAL(gdt_start) SYM_DATA_END_LABEL(gdt_start, SYM_L_LOCAL, gdt_end) .balign 16 -SYM_DATA_LOCAL(canary, .fill 48, 1, 0) - SYM_DATA_START_LOCAL(early_stack) .fill BOOT_STACK_SIZE, 1, 0 SYM_DATA_END_LABEL(early_stack, SYM_L_LOCAL, early_stack_end)