Linux EFI development
 help / color / mirror / Atom feed
* [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS
@ 2026-06-25 17:12 Theodore Tucker
  2026-07-23  6:39 ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Tucker @ 2026-06-25 17:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-efi, gpiccoli, tony.luck, kees, ilias.apalodimas, ardb,
	Theodore Tucker

The efivars backend to pstore will not register if the efivarfs is
not available. The efivars sysfs interface was removed in Linux 6.0,
meaning efivarfs is now the only way pstore can write into EFI
variables. Making the dependency on the efivarfs explicit removes
a stumbling block when configuring a kernel with pstore.

Signed-off-by: Theodore Tucker <theodore@tti0.net>
---
 drivers/firmware/efi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 29e0729299f5..8dfd21e7a8e4 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -9,7 +9,7 @@ config EFI_ESRT
 
 config EFI_VARS_PSTORE
 	tristate "Register efivars backend for pstore"
-	depends on PSTORE
+	depends on PSTORE && EFIVAR_FS
 	select UCS2_STRING
 	default y
 	help
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS
  2026-06-25 17:12 [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS Theodore Tucker
@ 2026-07-23  6:39 ` Ard Biesheuvel
  2026-08-20 11:49   ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2026-07-23  6:39 UTC (permalink / raw)
  To: Theodore Tucker, linux-kernel
  Cc: linux-efi, Guilherme G. Piccoli, Tony Luck, Kees Cook,
	Ilias Apalodimas



On Thu, 25 Jun 2026, at 19:12, Theodore Tucker wrote:
> The efivars backend to pstore will not register if the efivarfs is
> not available. The efivars sysfs interface was removed in Linux 6.0,
> meaning efivarfs is now the only way pstore can write into EFI
> variables. Making the dependency on the efivarfs explicit removes
> a stumbling block when configuring a kernel with pstore.
>
> Signed-off-by: Theodore Tucker <theodore@tti0.net>
> ---
>  drivers/firmware/efi/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Applied, thanks.

> diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> index 29e0729299f5..8dfd21e7a8e4 100644
> --- a/drivers/firmware/efi/Kconfig
> +++ b/drivers/firmware/efi/Kconfig
> @@ -9,7 +9,7 @@ config EFI_ESRT
> 
>  config EFI_VARS_PSTORE
>  	tristate "Register efivars backend for pstore"
> -	depends on PSTORE
> +	depends on PSTORE && EFIVAR_FS
>  	select UCS2_STRING
>  	default y
>  	help
> -- 
> 2.47.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS
  2026-07-23  6:39 ` Ard Biesheuvel
@ 2026-08-20 11:49   ` Ard Biesheuvel
  2026-08-20 17:54     ` Theodore Tucker
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2026-08-20 11:49 UTC (permalink / raw)
  To: Theodore Tucker, linux-kernel
  Cc: linux-efi, Guilherme G. Piccoli, Tony Luck, Kees Cook,
	Ilias Apalodimas



On Thu, 23 Jul 2026, at 09:39, Ard Biesheuvel wrote:
> On Thu, 25 Jun 2026, at 19:12, Theodore Tucker wrote:
>> The efivars backend to pstore will not register if the efivarfs is
>> not available. The efivars sysfs interface was removed in Linux 6.0,
>> meaning efivarfs is now the only way pstore can write into EFI
>> variables. Making the dependency on the efivarfs explicit removes
>> a stumbling block when configuring a kernel with pstore.
>>
>> Signed-off-by: Theodore Tucker <theodore@tti0.net>
>> ---
>>  drivers/firmware/efi/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>
> Applied, thanks.
>

Actually, EFI pstore does not depend on efivarfs, it only depends on
the efivars layer.

Why do you think it needs to depend on EFIVAR_FS?

>> diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
>> index 29e0729299f5..8dfd21e7a8e4 100644
>> --- a/drivers/firmware/efi/Kconfig
>> +++ b/drivers/firmware/efi/Kconfig
>> @@ -9,7 +9,7 @@ config EFI_ESRT
>> 
>>  config EFI_VARS_PSTORE
>>  	tristate "Register efivars backend for pstore"
>> -	depends on PSTORE
>> +	depends on PSTORE && EFIVAR_FS
>>  	select UCS2_STRING
>>  	default y
>>  	help
>> -- 
>> 2.47.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS
  2026-08-20 11:49   ` Ard Biesheuvel
@ 2026-08-20 17:54     ` Theodore Tucker
  2026-08-21  7:18       ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Tucker @ 2026-08-20 17:54 UTC (permalink / raw)
  To: Ard Biesheuvel, linux-kernel
  Cc: linux-efi, Guilherme G. Piccoli, Tony Luck, Kees Cook,
	Ilias Apalodimas

Hi,

On 20/08/2026 12:49, Ard Biesheuvel wrote:
> 
> Actually, EFI pstore does not depend on efivarfs, it only depends on
> the efivars layer.
> 
> Why do you think it needs to depend on EFIVAR_FS?

When building a 7.0 kernel for x86 with `make alldefconfig` and then 
enabling CONFIG_EFI, CONFIG_PSTORE, and CONFIG_EFI_VARS_PSTORE, I found 
that the EFI pstore backend failed to register 
(/sys/module/pstore/parameters/backend was empty after boot) unless 
CONFIG_EFIVAR_FS had also been enabled explicitly.

I can see now that EFI pstore code should not need the efivarfs, and 
neither should userspace, since it gets access to any logs through 
/sys/fs/pstore. So I do appreciate that my patch may not be the right 
fix here, and I proposed it not as an expert on the internals of EFI 
pstore, but from experimentation as a user. Sorry for the noise.

I eventually ended up using the ramoops pstore backend so unfortunately 
no longer have the exact kernel configurations I used when this tripped 
me up.

Thanks and kind regards,

Theodore


-- 
Theodore Tucker
theodore@tti0.net


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS
  2026-08-20 17:54     ` Theodore Tucker
@ 2026-08-21  7:18       ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2026-08-21  7:18 UTC (permalink / raw)
  To: Theodore Tucker, linux-kernel
  Cc: linux-efi, Guilherme G. Piccoli, Tony Luck, Kees Cook,
	Ilias Apalodimas



On Thu, 20 Aug 2026, at 20:54, Theodore Tucker wrote:
> Hi,
>
> On 20/08/2026 12:49, Ard Biesheuvel wrote:
>> 
>> Actually, EFI pstore does not depend on efivarfs, it only depends on
>> the efivars layer.
>> 
>> Why do you think it needs to depend on EFIVAR_FS?
>
> When building a 7.0 kernel for x86 with `make alldefconfig` and then 
> enabling CONFIG_EFI, CONFIG_PSTORE, and CONFIG_EFI_VARS_PSTORE, I found 
> that the EFI pstore backend failed to register 
> (/sys/module/pstore/parameters/backend was empty after boot) unless 
> CONFIG_EFIVAR_FS had also been enabled explicitly.
>
> I can see now that EFI pstore code should not need the efivarfs, and 
> neither should userspace, since it gets access to any logs through 
> /sys/fs/pstore. So I do appreciate that my patch may not be the right 
> fix here, and I proposed it not as an expert on the internals of EFI 
> pstore, but from experimentation as a user. Sorry for the noise.
>

No worries.

> I eventually ended up using the ramoops pstore backend so unfortunately 
> no longer have the exact kernel configurations I used when this tripped 
> me up.
>
> Thanks and kind regards,
>

Thanks for the context. I've dropped your patch from the queue.

It would be nice to understand what exactly went wrong in your case,
but I agree it is probably not worth your time (or mine) to try and
reproduce the exact conditions under which it occurred.

-- 
Ard.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-21  7:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-25 17:12 [PATCH] efi: Make EFI_VARS_PSTORE depend on EFIVAR_FS Theodore Tucker
2026-07-23  6:39 ` Ard Biesheuvel
2026-08-20 11:49   ` Ard Biesheuvel
2026-08-20 17:54     ` Theodore Tucker
2026-08-21  7:18       ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox