Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp208029pxb; Thu, 2 Sep 2021 02:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv3u6isxUG08DkSJ9R+OzhM+7uC/tx4hcVo+m0J5eFkTENtENYqqaBN7+9W57VfqUd4Rpt X-Received: by 2002:a92:cf10:: with SMTP id c16mr1633194ilo.172.1630574240354; Thu, 02 Sep 2021 02:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630574240; cv=none; d=google.com; s=arc-20160816; b=d4cUEs33CM3u9Pn958RsddbCeQnjBGEAATRUYjgcAU6DY90WUBqImvM6WoOe9y5fWQ O8utAFq8oAbv0vMqAKj26cJbADaEd/whZzS29mmX7f/e+EYXoGdtGd9DfCmzZYHFytc/ wzWEN5zVZK3hbi59LhvR0MFt6DrpwV78e07fcFSX8H3NJgsdkAtEjMyyya7VZHdTWULX hfuPASvqyQ2bkEDS7J/P5eD0n8KOpYC/Yj8VX/XXWFPqC8z1SzhmftWLvI0abkxiaEHA PU9jXtzRSrAyZq8g9Vym7tCv+sLVggNjLBBRRMH6E7gdEu3fAlexMbcrcCgZe304vM0a jASA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vZXewvd5uQfz8mD6NRgiq7Yq8l5foALrwhdERkp8WJE=; b=UkiKbrpie8voYLHhde7ogFrZA6fWJqscqnLQjFSTLE66EAys9R7vjW0Q9hROPhTxnQ XAWOIoULW8OkkmnZm661C8BKexDsM162B36CxMr6LMVZDqfXkq1EjmtNzfXabrZHwl4c 4i2/271V6hqRa61R2qsLQ5HlXDw1tmV0XUnCdABu3ntHZ8tsroWiVsCoXMP4hUn/4xAI eXZocOstW4qUEFDHfZQxhFiibhYocWhmMaDf95dVX+BSztCuoFKQ8Sh/Y12t4U5U2wlI CGyWxFAEiRd0Qu+N8txFphMHplnmAtlel/3Au3+ZMnACZuRmsrKRqKLtLaSBprlWf5/h VlWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jWDR2eW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si1331920ile.158.2021.09.02.02.17.08; Thu, 02 Sep 2021 02:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jWDR2eW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245127AbhIBJQo (ORCPT + 99 others); Thu, 2 Sep 2021 05:16:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233624AbhIBJQa (ORCPT ); Thu, 2 Sep 2021 05:16:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109ACC061575 for ; Thu, 2 Sep 2021 02:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vZXewvd5uQfz8mD6NRgiq7Yq8l5foALrwhdERkp8WJE=; b=jWDR2eW03qGMMEzPGmhHjqp49F MiWijT2tktjOFwWbZrosEeoNhzAGRmp3A7B5MNR9a8uOCq6PBCuGRmmac5ZJUmiHkhuCArvIpqpM7 7cmMHeInLVFe3BdX8LFAx9pAhf+DIcYAiPKndClEw1WHrfbaiiQD1KcRywFVeKvW5UJAPtGWzS2P0 08IuOtFF/J5hCQ9iLy+hw63GVPtPfH2+AQ/YXVHdFVVI0hcw9pFXjGBoeP/yqulYElb4gx1ndiNSx VluP8EMBzgC4jWMv+Imo6s+oxC3f6QqfRJ7QmRdrx0M6SI69/tIIImTCPxGmj1WZworonnySqO3Ng GPfqyaoQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLine-003Jkd-6m; Thu, 02 Sep 2021 09:14:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BF6DC3001C0; Thu, 2 Sep 2021 11:14:20 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 77EF6285E1169; Thu, 2 Sep 2021 11:14:20 +0200 (CEST) Date: Thu, 2 Sep 2021 11:14:20 +0200 From: Peter Zijlstra To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Lai Jiangshan , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH 04/24] x86/entry: Expose the address of .Lgs_change to traps.c Message-ID: References: <20210831175025.27570-1-jiangshanlai@gmail.com> <20210831175025.27570-5-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210831175025.27570-5-jiangshanlai@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 01, 2021 at 01:50:05AM +0800, Lai Jiangshan wrote: > diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S > index e38a4cf795d9..9164e85b36b8 100644 > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -729,6 +729,7 @@ _ASM_NOKPROBE(common_interrupt_return) > SYM_FUNC_START(asm_load_gs_index) > FRAME_BEGIN > swapgs > +SYM_INNER_LABEL(asm_load_gs_index_gs_change, SYM_L_GLOBAL) > .Lgs_change: After all the patches, there's only a single .Lgs_change reference left. Can't we convert the _ASM_EXTABLE() entry to use the new label and totally remove it? > movl %edi, %gs > 2: ALTERNATIVE "", "mfence", X86_BUG_SWAPGS_FENCE > @@ -1011,7 +1012,7 @@ SYM_CODE_START_LOCAL(error_entry) > movl %ecx, %eax /* zero extend */ > cmpq %rax, RIP+8(%rsp) > je .Lbstep_iret > - cmpq $.Lgs_change, RIP+8(%rsp) > + cmpq $asm_load_gs_index_gs_change, RIP+8(%rsp) > jne .Lerror_entry_done_lfence