Re: [PATCH 1/2] efi/runtime-wrappers: bound the wait for EFI runtime service calls
Breno Leitao <[email protected]> Fri, 12 Jun 2026 03:28:59 -0700
| Newsgroups | org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Ard, On Thu, Jun 11, 2026 at 12:57:50PM +0200, Ard Biesheuvel wrote: > > Could we just clear the EFI_RUNTIME_SERVICES bit here right away? That > > way, we probably won't need the second patch (unless I'm mistaken). It > > /should/ also block the calls that are not routed via the workqueue, > > e.g., any EFI pstore calls to the non-blocking SetVariable() variant, > > but I just noticed that we never check EFI_RUNTIME_SERVICES on those > > code paths, which is probably a bug. > > > > And please return EFI_ABORTED rather than EFI_TIMEOUT - probably doesn't > > matter in practice but I'd like to avoid introducing more EFI return codes > > in the runtime context that the spec mentions only for boot services stuff. > > Also, could we prevent the kthread that runs the workqueue from being scheduled > again if we decide that the runtime services are wedged? Sure, I can park it at for (;;) schedule()). Maybe with a helper?! > x86 has some logic for this when a page fault occurs, and I wonder if > there is a generic way to do something similar. I have no clue, to be honest. If you have something specific in mind, I'll dig in. Thanks for the review, --breno