[PATCHv7 00/13] kexec: Use BPF lskel to enable kexec to load PE format boot image
Ard Biesheuvel
ardb at kernel.org
Tue Oct 13 21:39:14 PDT 2026
(removed some bouncing cc'ees)
On Wed, 14 Oct 2026, at 02:02, Jason Gunthorpe wrote:
> On Tue, Oct 13, 2026 at 09:19:28PM +0200, Ard Biesheuvel wrote:
>> > Given those constraints entering the successor kernel through the
>> > normal EFI entry point is highly desirable. This would allow x86 to
>> > continue to provide the DRTM trampolines through an EFI mechanism and
>> > means the Linux EFI stub always handles the launch with identical code
>> > in all scenarios.
>>
>> With some help from my friend Claude, I've prepared a prototype that
>> reuses my efiloader Rust crate to boot EFI stub images (bare Image,
>> zboot, UKI) in the kernel: the EFI boot phase is invoked at kexec
>> load time, and runs under the preceding kernel up until the point
>> where ExitBootServices() is called. Then, the actual kexec call
>> will return from ExitBootServices() after shutting down the first
>> kernel.
>
> Running it inside a kthread is such a novel idea, I would have never
> thought to attempt that!
>
> I've asked some folks here to take a look and try to test this with
> real DRTM capable HW. It seems very promising that it will work to me,
> and I surmize this is also close to boot a UKI?
>
It already works for UKIs as well.
The next step is to run it deprivileged - I think the arm64 stub code
is already very close to being runnable in that manner.
More information about the kexec
mailing list