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

"Chang, Junxiao" <[email protected]> Thu, 30 Jul 2026 06:14:56 +0000
Newsgroups org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel
Message-ID <DS0PR11MB813414CE40CBBE6A38386D96ECC92@DS0PR11MB8134.namprd11.prod.outlook.com>
Ard Biesheuvel wrote:
>Subject: Re: [PATCH] mefi: add dynamic control interface for EFI runtime s=
ervices
>
>(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 h=
igh 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