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

Kees Cook
2025-12-04T23:36:08Z

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@packett.cool>

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@kernel.org>

--
Kees Cook