Re: [PATCH v6 1/8] efi: Pass KHO state to the next kernel in a configuration table
From: George Guo
Date: Fri Nov 27 2026 - 10:41:14 EST
Hi Mukesh,
Thanks for the review, and sorry for the slow reply.
On 2026/11/4 20:24, Mukesh Pilaniya wrote:
>> + pr_warn("Could not map UEFI KHO table!\n");
> This is a Linux EFI configuration table, not a __UEFI KHO table__, so
> IMHO; UEFI wording is wrong here.
Agreed. v7 changes it to:
pr_warn("Could not map KHO config table!\n");
>> + if (status != EFI_SUCCESS)
>> + efi_err("Failed to install KHO config table!\n");
> When install_configuration_table fails, the pool allocation made
> just above using efi_bs_callis never freed, so a page of
> EFI_LOADER_DATA is leaked until ExitBootServices, This is a minor leak
> so mentioned here for review completeness.
Will fix in v7. The pool is freed when the install fails:
if (status != EFI_SUCCESS) {
efi_err("Failed to install KHO config table!\n");
efi_bs_call(free_pool, kho);
}
>> + * The EFI stub installs this table zeroed on a cold boot. It stays
>> + * in place across kexec; the running kernel rewrites it just before
>> + * each kexec, and the next kernel reads it during early boot.
> This statement is only true for the LoongArch and on arm64/riscv/x86 no
> table exists, so the comment describes a kernel-wide invariant that does
> not hold.
Right. I don't want to name only LoongArch here, because x86 is
expected to use the same table in a follow-up series. v7 rewords it
as:
* Only installed by the EFI stub of architectures that pass KHO state
* this way (currently LoongArch); elsewhere the table does not exist.
* The stub installs it zeroed on a cold boot. It stays in place across
* kexec; the running kernel rewrites it just before each kexec, and the
* next kernel reads it during early boot.
Thanks,
George