diff options
| author | Breno Leitao <leitao@debian.org> | 2026-06-16 05:09:39 -0700 |
|---|---|---|
| committer | Ard Biesheuvel <ardb@kernel.org> | 2026-08-20 14:45:05 +0300 |
| commit | bb50e70f4ffe12ad1710883603ba8109bb5d6dfd (patch) | |
| tree | da627333e084a203fcf548823bb20396d2199f17 /tools/perf/scripts/python/bin/export-to-sqlite-report | |
| parent | 60618389de92444b3b11a6385c306109fc89c46a (diff) | |
| download | linux-bb50e70f4ffe12ad1710883603ba8109bb5d6dfd.tar.gz linux-bb50e70f4ffe12ad1710883603ba8109bb5d6dfd.zip | |
efi/runtime-wrappers: honour EFI_RUNTIME_SERVICES in the non-blocking paths
Three wrappers call firmware directly instead of going through
__efi_queue_work(), and none of them check whether runtime services are
still enabled: virt_efi_set_variable_nb(),
virt_efi_query_variable_info_nb() and virt_efi_reset_system(). Once a
hang has cleared EFI_RUNTIME_SERVICES - or efi_recover_from_page_fault()
has cleared it on a firmware page fault - these paths still enter the
(possibly wedged) firmware, e.g. an EFI pstore write through the
non-blocking SetVariable() variant, in violation of UEFI's
non-reentrancy rules. reset_system() is reachable too: efi_reboot()
only gates it on the static efi_rt_services_supported() mask, which does
not track the runtime disable.
Check efi_enabled(EFI_RUNTIME_SERVICES) in each before calling into
firmware. Test it after taking efi_runtime_lock rather than before: the
bit is only ever cleared at runtime while that lock is held, so checking
it under the lock avoids racing with a concurrent timeout that clears the
bit and drops the lock.
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-sqlite-report')
0 files changed, 0 insertions, 0 deletions
