public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-efi@vger.kernel.org
Subject: Re: [GIT PULL] EFI updates for v6.15
Date: Mon, 31 Mar 2025 18:55:45 +0200	[thread overview]
Message-ID: <Z-rJESxkzhg438vo@gmail.com> (raw)
In-Reply-To: <CAMj1kXEpYG7LFgDiM2g4VsBVy1-+8pPxSwy6Xc9DS5u9f8aQZg@mail.gmail.com>


* Ard Biesheuvel <ardb@kernel.org> wrote:

> So what I would like to propose for this arch/x86/boot/<something> 
> subdirectory is to move all these source files there, and build a 
> static library that can be pulled into the kernel proper as well as 
> the decompressor, using C flags etc that ensure that all code it 
> contains is safe for execution from the 1:1 mapping. This is how the 
> EFI stub static library is built, and also how the code in 
> arch/arm64/kernel/pi/ is constructed to ensure that it can safely run 
> from a virtual mapping that doesn't match the one the linker used at 
> build time.
> 
> How does that sound?

Sounds fantastic, related code should be together, like friends around 
a campfire.

Proposed locations, if it's 99% boot/init code (SYSTEM_BOOTING code):

	arch/x86/boot/efi/
	arch/x86/boot/efi/lib/
	arch/x86/boot/efilib/
	arch/x86/boot/lib/efi/

... or if there's a substantial runtime code (SYSTEM_RUNNING code):

	arch/x86/platform/efi/   # <--- already exists
	arch/x86/kernel/efi/

I'm a bit against the arch/x86/lib/ location for the simple reason
that the x86 library functions are usually simple self-contained 
regular-runtime facilities in C or asm with very little magic, which 
the EFI boot/stub code is as far away from as technologically possible. 
;-)

Look into arch/x86/lib/ and you'll see that EFI functionality doesn't 
really fit there.

Thanks,

	Ingo

  reply	other threads:[~2025-03-31 16:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  7:05 [GIT PULL] EFI updates for v6.15 Ard Biesheuvel
2025-03-29 18:46 ` Linus Torvalds
2025-03-29 19:07   ` Ard Biesheuvel
2025-03-29 19:44     ` Linus Torvalds
2025-03-30  8:10     ` Ingo Molnar
2025-03-31 13:55       ` Ard Biesheuvel
2025-03-31 16:55         ` Ingo Molnar [this message]
2025-04-01  6:44           ` Ard Biesheuvel
2025-04-01  8:32             ` Ingo Molnar
2025-04-01  8:56               ` Ard Biesheuvel
2025-04-01  9:08                 ` Ingo Molnar
2025-04-01  9:10                   ` Ard Biesheuvel
2025-03-29 19:56 ` pr-tracker-bot

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=Z-rJESxkzhg438vo@gmail.com \
    --to=mingo@kernel.org \
    --cc=ardb@kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=torvalds@linux-foundation.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