stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb+git@google.com>
To: stable@vger.kernel.org
Cc: Hou Wenlong <houwenlong.hwl@antgroup.com>
Subject: [PATCH -for-stable-v6.6+ 1/6] x86/head/64: Move the __head definition to <asm/init.h>
Date: Mon,  8 Apr 2024 08:49:19 +0200	[thread overview]
Message-ID: <20240408064917.3391405-9-ardb+git@google.com> (raw)
In-Reply-To: <20240408064917.3391405-8-ardb+git@google.com>

From: Hou Wenlong <houwenlong.hwl@antgroup.com>

[ Commit d2a285d65bfde3218fd0c3b88794d0135ced680b upstream ]

Move the __head section definition to a header to widen its use.

An upcoming patch will mark the code as __head in mem_encrypt_identity.c too.

Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/0583f57977be184689c373fe540cbd7d85ca2047.1697525407.git.houwenlong.hwl@antgroup.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/x86/include/asm/init.h | 2 ++
 arch/x86/kernel/head64.c    | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/init.h b/arch/x86/include/asm/init.h
index 5f1d3c421f68..cc9ccf61b6bd 100644
--- a/arch/x86/include/asm/init.h
+++ b/arch/x86/include/asm/init.h
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_INIT_H
 #define _ASM_X86_INIT_H
 
+#define __head	__section(".head.text")
+
 struct x86_mapping_info {
 	void *(*alloc_pgt_page)(void *); /* allocate buf for page table */
 	void *context;			 /* context for alloc_pgt_page */
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index bbc21798df10..c58213bce294 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -41,6 +41,7 @@
 #include <asm/trapnr.h>
 #include <asm/sev.h>
 #include <asm/tdx.h>
+#include <asm/init.h>
 
 /*
  * Manage page tables very early on.
@@ -84,8 +85,6 @@ static struct desc_ptr startup_gdt_descr = {
 	.address = 0,
 };
 
-#define __head	__section(".head.text")
-
 static void __head *fixup_pointer(void *ptr, unsigned long physaddr)
 {
 	return ptr - (void *)_text + (void *)physaddr;
-- 
2.44.0.478.gd926399ef9-goog


  reply	other threads:[~2024-04-08  6:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  6:49 [PATCH -for-stable-v6.6+ 0/6] EFI/x86 updates for secure boot Ard Biesheuvel
2024-04-08  6:49 ` Ard Biesheuvel [this message]
2024-04-08  6:49 ` [PATCH -for-stable-v6.6+ 2/6] efi/libstub: Add generic support for parsing mem_encrypt= Ard Biesheuvel
2024-04-08  6:49 ` [PATCH -for-stable-v6.6+ 3/6] x86/boot: Move mem_encrypt= parsing to the decompressor Ard Biesheuvel
2024-04-08 12:37   ` Greg KH
2024-04-08 13:20     ` Ard Biesheuvel
2024-04-08  6:49 ` [PATCH -for-stable-v6.6+ 4/6] x86/sme: Move early SME kernel encryption handling into .head.text Ard Biesheuvel
2024-04-08  6:49 ` [PATCH -for-stable-v6.6+ 5/6] x86/sev: Move early startup code into .head.text section Ard Biesheuvel
2024-04-08  6:49 ` [PATCH -for-stable-v6.6+ 6/6] x86/efistub: Remap kernel text read-only before dropping NX attribute Ard Biesheuvel
2024-04-08 11:59 ` [PATCH -for-stable-v6.6+ 0/6] EFI/x86 updates for secure boot Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240408064917.3391405-9-ardb+git@google.com \
    --to=ardb+git@google.com \
    --cc=houwenlong.hwl@antgroup.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).