RE: [PATCH] mefi: add dynamic control interface for EFI runtime services

From: Chang, Junxiao

Date: Thu Jul 30 2026 - 02:27:48 EST


Ard Biesheuvel wrote:
>Subject: Re: [PATCH] mefi: add dynamic control interface for EFI runtime services
>
>(cc Sebastian)
>
>On Sat, 4 Jul 2026, at 02:33, Junxiao Chang wrote:
>> Add an interface to dynamically enable or disable EFI runtime services
>
>I'd prefer not to add a command line option for this. If the sysfs control is useful,
>we can enable it unconditionally, or depend on PREEMPT_RT.
I will remove cmdline option and make it depend on PREEMPT_RT. Usually EFI runtime service takes 100us to 2ms, it is ok for non-rt case, but it is a high latency for RT.

>
>> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
>> + clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
>
>This is racy, no?
Is it ok to change it with locking "efi_runtime_lock"?

>
>> --
>> 2.43.0