From patchwork Fri Apr 28 09:50:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Wenlong X-Patchwork-Id: 88576 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp823746vqo; Fri, 28 Apr 2023 03:16:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BqHc4BpmsZ13YHgZ76F7SYrfXogJeYUQkAEwRhbMsw/s3mmZZ5PbXVHmJ4k7CuOfg6h7p X-Received: by 2002:a05:6a00:2d93:b0:63d:4358:9140 with SMTP id fb19-20020a056a002d9300b0063d43589140mr7495003pfb.34.1682676985059; Fri, 28 Apr 2023 03:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682676985; cv=none; d=google.com; s=arc-20160816; b=qMV3ZTmkxfeRzrYz3nlwWYT7SVCqxJEr+ct8nXPS7MBNFPBT1nwYu4CHl6C22pqwUG FxUQ9IucyHYTJ+tfpVSKN0GRsCqEtPTHAOUauSON3TML0UcA1FQLWkQBfDNHfGz+NP5x yimNXHpOMmIhCumquBhSUEBcYoFKkG3fOGGniixCalJl2gE6g6m7eBgs/ZxZBqQw7zst Oa8RAVW3nm3Ymeu708Ij/968tI9ZJbCvhWz+6ZcF6UDvoT77j6ql+wHgMU0G8yCSSMie 8EBeN2Fy213ir4o3ixtTKWGpoarF5rJ75JNyzdHkNDB2ZfNB64SssBtZFt5+ijvuYvpn KuQg== 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=l9k8s6njlw1m/JkJqnzjIMPz3LzlHbD3gAIi3L6lc6s=; b=Bgzm+eWqRwgzI8sr2Dy4cGfFfY0hB6HvZjC4FLNHd4aBoogtIMRC172onGm/kE4Mz+ idpGVAzI3qtViz9Q/YzsgnrsazfmEVk5jonZaYfgDh03FZepAehowx2tzIEVxSj1NyZ+ R0QXR7v/OnwAMxOMnOMI2QtJ/+XJwEENbIhelKWQPMPxlShkx77fHHUEvvE7Yl/cNfYi 5wG3gjbcKz/aHl3dsMojXLM48FyAmCEmKGGImo997o5RtWN00sDNHpLmzSc3wxKAJEe4 pV9TyuBzeohRgrb/HyXNcjDx5jYLiZANy9jWthBuq6wEu0pCP38hh1N7sHr/t4t8fcnl 2qnw== 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 h12-20020a056a00000c00b0063b24c661c8si20972903pfk.364.2023.04.28.03.16.09; Fri, 28 Apr 2023 03:16:25 -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 S1345707AbjD1JxD (ORCPT + 99 others); Fri, 28 Apr 2023 05:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345686AbjD1Jwl (ORCPT ); Fri, 28 Apr 2023 05:52:41 -0400 Received: from out0-202.mail.aliyun.com (out0-202.mail.aliyun.com [140.205.0.202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 058505BBE for ; Fri, 28 Apr 2023 02:52:19 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047201;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---.STFoGCe_1682675531; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.STFoGCe_1682675531) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 17:52:12 +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" , " =?utf-8?q?Peter_Zijlstra_=28Intel=29?= " , "Sebastian Andrzej Siewior" , "Arnd Bergmann" Subject: [PATCH RFC 11/43] x86/irq: Adapt assembly for PIE support Date: Fri, 28 Apr 2023 17:50:51 +0800 Message-Id: <38061a9bfc6f4a6b4bd9737d45ce4f551849ed08.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?1764414702074528882?= X-GMAIL-MSGID: =?utf-8?q?1764414702074528882?= Change the assembly options to work with pointers instead of integers. The generated code is the same PIE just ensures input is a pointer. Signed-off-by: Hou Wenlong Cc: Thomas Garnier Cc: Lai Jiangshan Cc: Kees Cook --- arch/x86/include/asm/irq_stack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/irq_stack.h b/arch/x86/include/asm/irq_stack.h index 798183867d78..caba5d1d0800 100644 --- a/arch/x86/include/asm/irq_stack.h +++ b/arch/x86/include/asm/irq_stack.h @@ -93,7 +93,7 @@ "popq %%rsp \n" \ \ : "+r" (tos), ASM_CALL_CONSTRAINT \ - : [__func] "i" (func), [tos] "r" (tos) argconstr \ + : [__func] "X" (func), [tos] "r" (tos) argconstr \ : "cc", "rax", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", \ "memory" \ ); \