Re: [PATCH] efi: pstore: Support late setup with TEE-backed efivars ops

From: Kees Cook

Date: Thu Dec 04 2025 - 18:36:08 EST


On Wed, Dec 03, 2025 at 01:28:29AM -0300, Val Packett wrote:
> On some platforms, EFI variable services only become available when an
> appropriate TEE driver is initialized such as qseecom, gsmi or stmm.
>
> This would work fine when efi_pstore was built as a module and loaded
> late by userspace, but with CONFIG_EFI_VARS_PSTORE=y this driver would
> quit due to non-writable efivars before the necessary driver had any
> chance to load.
>
> Listen to efivar_ops_nh notifications and retry the initialization when
> writable EFI variable ops become available.
>
> Signed-off-by: Val Packett <val@xxxxxxxxxxxx>

This seems fine to me, though I defer to Ard, who knows the EFI bits way
better than I do. :)

Acked-by: Kees Cook <kees@xxxxxxxxxx>

--
Kees Cook