From patchwork Fri Apr 28 09:50:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Wenlong X-Patchwork-Id: 88551 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp812511vqo; Fri, 28 Apr 2023 02:53:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4u4422kL6xH10FFU/ndntxN/AUn4knVpITuZQtaJ7m7Rt1xjZleZGeUMwi8uVPYfZYHlIx X-Received: by 2002:a05:6a20:7f92:b0:f0:916:e5d with SMTP id d18-20020a056a207f9200b000f009160e5dmr5663750pzj.42.1682675624333; Fri, 28 Apr 2023 02:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682675624; cv=none; d=google.com; s=arc-20160816; b=pQJ+uimGlrFV2t5Hg9XQiUR/zo1849RPX85vlmXzkmCHGgIrzEY5kORvneAbYJdPLc DIiZB0gdjMb8vDm8j8mEDFyPA3WXrad3pdi53K6etJIbSUTXFYwhSTupbUN8jejYRtRv czRVICqhER9aQQdLiuGPrMTGPAPc6AiIhnYb5wscR9V0wHkXmGeSie5s81ou/ufyIvnT 5qLx3PqiiHdvm/Y9SkL/WWqiJzIVuM5inMFmE0ZNfqPu862DPYK71dzVmlrtTWhIJyeC ymgU5BmsVDl1KRKNzxndRWX9Yo+mMRn5dhYHQk5t98RevBuKti2xTW9d2+7to0Rw0zWl m7XA== 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=VtHyvyd+h4I56mLQ8MQqUwbUEUpPiJqEGHwuJdwQGiw=; b=wq7U7cRxglPOJpnlW47OAJRtYpYsrtnY83vAA5JOP0pcHxxaH+PzZ5EKs/LoqdU1yn vkRqpvj0utLMnAQMFdkjhQ00R54EtEz+JVKGJJoTMlXgL+An9l9S4mRibxYHjCJt4FAR kATP3hCDYy3LEfhO70VcIq9MsKxp1Dw3Z1RqMeXCmOKVgxAsBxndHnQvaxjFXufSi1eu L7RjUq+B5ak/APSEAVsUhKC2B61pUqfl8nDuitp5JBqwGqpRfM6/30vvlI2QUluDiDsg vXKu/XI0tYaZs4J+WdNuH8suWS12GrhQATEF8bTs+8Lvt9FtOZcK1HMPhJq7z2DlQH+C neKQ== 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 n7-20020a6546c7000000b0050c0e269719si21150984pgr.513.2023.04.28.02.53.28; Fri, 28 Apr 2023 02:53:44 -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 S1345748AbjD1JwZ (ORCPT + 99 others); Fri, 28 Apr 2023 05:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345743AbjD1JwO (ORCPT ); Fri, 28 Apr 2023 05:52:14 -0400 Received: from out0-198.mail.aliyun.com (out0-198.mail.aliyun.com [140.205.0.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A15045263 for ; Fri, 28 Apr 2023 02:52:03 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R271e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047213;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---.STDfrtZ_1682675513; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.STDfrtZ_1682675513) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 17:51:54 +0800 From: "Hou Wenlong" To: linux-kernel@vger.kernel.org Cc: "Thomas Garnier" , "Lai Jiangshan" , "Kees Cook" , "Hou Wenlong" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , , "H. Peter Anvin" Subject: [PATCH RFC 05/43] x86: pm-trace: Adapt assembly for PIE support Date: Fri, 28 Apr 2023 17:50:45 +0800 Message-Id: <49a5d885f8cc02048a979ced4bf7e54f700ecb94.1682673543.git.houwenlong.hwl@antgroup.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764413275352200464?= X-GMAIL-MSGID: =?utf-8?q?1764413275352200464?= From: Thomas Garnier From: Thomas Garnier Change assembly to use the new _ASM_MOVABS macro instead of _ASM_MOV for the assembly to be PIE compatible. Signed-off-by: Thomas Garnier Signed-off-by: Hou Wenlong Cc: Lai Jiangshan Cc: Kees Cook --- arch/x86/include/asm/pm-trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/pm-trace.h b/arch/x86/include/asm/pm-trace.h index bfa32aa428e5..972070806ce9 100644 --- a/arch/x86/include/asm/pm-trace.h +++ b/arch/x86/include/asm/pm-trace.h @@ -8,7 +8,7 @@ do { \ if (pm_trace_enabled) { \ const void *tracedata; \ - asm volatile(_ASM_MOV " $1f,%0\n" \ + asm volatile(_ASM_MOVABS " $1f,%0\n" \ ".section .tracedata,\"a\"\n" \ "1:\t.word %c1\n\t" \ _ASM_PTR " %c2\n" \