summaryrefslogtreecommitdiff
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2023-11-07 14:40:55 +0900
committerArd Biesheuvel <ardb@kernel.org>2023-12-11 11:19:18 +0100
commit94f7f6182c72ba642c1f20111681f9cc8621c95f (patch)
treea469f9da0e5bdfd8416b779c7d908a7ee9fc1e5e /include/linux/efi.h
parentc44b6be62e8dd4ee0a308c36a70620613e6fc55f (diff)
efivarfs: automatically update super block flag
efivar operation is updated when the tee_stmm_efi module is probed. tee_stmm_efi module supports SetVariable runtime service, but user needs to manually remount the efivarfs as RW to enable the write access if the previous efivar operation does not support SetVariable and efivarfs is mounted as read-only. This commit notifies the update of efivar operation to efivarfs subsystem, then drops SB_RDONLY flag if the efivar operation supports SetVariable. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> [ardb: use per-superblock instance of the notifier block] Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 3668aa204c47..c74f47711f0b 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1349,6 +1349,14 @@ bool efi_config_table_is_usable(const efi_guid_t *guid, unsigned long table)
umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n);
+/*
+ * efivar ops event type
+ */
+#define EFIVAR_OPS_RDONLY 0
+#define EFIVAR_OPS_RDWR 1
+
+extern struct blocking_notifier_head efivar_ops_nh;
+
void efivars_generic_ops_register(void);
void efivars_generic_ops_unregister(void);