summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-10-15 22:56:37 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2025-11-11 18:59:22 +0000
commita2860501203cf7a2116adf3bb4e4c456c5750872 (patch)
treebada8f503d4a20c26abf9f10c6dde321b2e12ba6 /include
parent40374d308e4e456048d83991e937f13fc8bda8bf (diff)
efi/runtime-wrappers: Keep track of the efi_runtime_lock owner
The EFI runtime wrappers use a file local semaphore to serialize access to the EFI runtime services. This means that any calls to the arch wrappers around the runtime services will also be serialized, removing the need for redundant locking. For robustness, add a facility that allows those arch wrappers to assert that the semaphore was taken by the current task. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index a98cc39e7aaa..b23ff8b83219 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1126,6 +1126,8 @@ static inline bool efi_runtime_disabled(void) { return true; }
extern void efi_call_virt_check_flags(unsigned long flags, const void *caller);
extern unsigned long efi_call_virt_save_flags(void);
+void efi_runtime_assert_lock_held(void);
+
enum efi_secureboot_mode {
efi_secureboot_mode_unset,
efi_secureboot_mode_unknown,