mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Gerst <brgerst@gmail.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, Ard Biesheuvel <ardb@kernel.org>,
	Juergen Gross <jgross@suse.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Brian Gerst <brgerst@gmail.com>
Subject: [PATCH 0/5] x86/boot: Early boot cleanups
Date: Thu, 23 Jul 2026 23:02:51 -0400	[thread overview]
Message-ID: <20260724030256.232690-1-brgerst@gmail.com> (raw)

This series moves clearing BSS and copying boot parameters and the
command line to the early boot code.  Clearing BSS early prevents using
unitialized data making the code more robust.  Copying the boot
parameters early simplifies the code by not needing to pass around the
orignal source pointer and does not need special handling when
encryption is enabled.

Note: The memory encryption parts have only been compile tested due to
lack of access to capable hardware.

Brian Gerst (5):
  x86/sme: Clear decrypted BSS separately
  x86/boot/64: Clear BSS as early as possible
  x86/boot: Remove hardcoded boot_param constants
  x86/boot/64: Remove copy_bootdata() call
  x86/boot/64: Copy boot parameters and command line earlier

 arch/x86/boot/startup/map_kernel.c      | 10 ++--
 arch/x86/boot/startup/sme.c             |  6 ++-
 arch/x86/include/asm/mem_encrypt.h      | 14 ++----
 arch/x86/include/asm/setup.h            | 11 ++---
 arch/x86/kernel/asm-offsets.c           |  3 ++
 arch/x86/kernel/head64.c                | 61 ++---------------------
 arch/x86/kernel/head_32.S               |  4 +-
 arch/x86/kernel/head_64.S               | 47 ++++++++++++++----
 arch/x86/kernel/setup.c                 |  1 +
 arch/x86/kernel/smpboot.c               |  2 +-
 arch/x86/kernel/vmlinux.lds.S           |  2 +-
 arch/x86/mm/mem_encrypt_amd.c           | 64 ++-----------------------
 arch/x86/xen/enlighten_pv.c             |  4 +-
 arch/x86/xen/xen-head.S                 |  5 +-
 drivers/firmware/efi/libstub/x86-stub.c |  6 +--
 15 files changed, 76 insertions(+), 164 deletions(-)


base-commit: 1b57632fa6f9ad161c2633a6df4c65e973790218
-- 
2.55.0


             reply	other threads:[~2026-07-24  3:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24  3:02 Brian Gerst [this message]
2026-07-24  3:02 ` [PATCH 1/5] x86/sme: Clear decrypted BSS separately Brian Gerst
2026-07-24 16:41   ` Tom Lendacky
2026-07-24 18:57     ` Brian Gerst
2026-07-24 19:56       ` Tom Lendacky
2026-07-24 21:06         ` Brian Gerst
2026-07-24  3:02 ` [PATCH 2/5] x86/boot/64: Clear BSS as early as possible Brian Gerst
2026-07-24 11:04   ` Nikolay Borisov
2026-07-24 11:34     ` Brian Gerst
2026-07-27 19:00       ` Brian Gerst
2026-07-24  3:02 ` [PATCH 3/5] x86/boot: Remove hardcoded boot_param constants Brian Gerst
2026-07-24 13:19   ` Nikolay Borisov
2026-07-24 18:22   ` Tom Lendacky
2026-07-24 19:03     ` Brian Gerst
2026-07-24  3:02 ` [PATCH 4/5] x86/boot/64: Remove copy_bootdata() call Brian Gerst
2026-07-24  3:02 ` [PATCH 5/5] x86/boot/64: Copy boot parameters and command line earlier Brian Gerst

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=20260724030256.232690-1-brgerst@gmail.com \
    --to=brgerst@gmail.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@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

Powered by JetHome