From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A98ECDB482 for ; Tue, 17 Oct 2023 07:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234592AbjJQHIh (ORCPT ); Tue, 17 Oct 2023 03:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234575AbjJQHIe (ORCPT ); Tue, 17 Oct 2023 03:08:34 -0400 Received: from out0-193.mail.aliyun.com (out0-193.mail.aliyun.com [140.205.0.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C53793 for ; Tue, 17 Oct 2023 00:08:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047202;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=22;SR=0;TI=SMTPD_---.V10zIDI_1697526506; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.V10zIDI_1697526506) by smtp.aliyun-inc.com; Tue, 17 Oct 2023 15:08:27 +0800 From: "Hou Wenlong" To: linux-kernel@vger.kernel.org Cc: "Hou Wenlong" , "Alexander Shishkin" , "Andrew Morton" , "Andy Lutomirski" , "Anshuman Khandual" , "Arnd Bergmann" , "Borislav Petkov" , "Dave Hansen" , "H. Peter Anvin" , "Ingo Molnar" , "Josh Poimboeuf" , "Michael Kelley" , "Mike Rapoport" , "Pasha Tatashin" , "Peter Zijlstra" , "Steve Rutherford" , "Thomas Gleixner" , "Tom Lendacky" , "Wang Jinchao" , , "Yuntao Wang" Subject: [PATCH 0/2] x86/head/64: Mark the code as __head in mem_encrypt_identity.c Date: Tue, 17 Oct 2023 15:08:05 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Similar to head64.c, mark all the code in mem_encrypt_identity.c as __head since it runs in the identity address. This is part of the patchset that builds the head code as PIE[1]. [1]: https://lore.kernel.org/all/cover.1689130310.git.houwenlong.hwl@antgroup.com Hou Wenlong (2): x86/head/64: Move the __head definition to x86/sme: Mark the code as __head in mem_encrypt_identity.c arch/x86/include/asm/init.h | 2 ++ arch/x86/include/asm/mem_encrypt.h | 8 ++++---- arch/x86/kernel/head64.c | 3 +-- arch/x86/mm/mem_encrypt_identity.c | 27 ++++++++++++++------------- 4 files changed, 21 insertions(+), 19 deletions(-) base-commit: 0c09c1d70838475762255844b72fa0e7fd6ace7c -- 2.31.1