From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: Ard Biesheuvel <ardb@kernel.org>,
Jens Wiklander <jens.wiklander@linaro.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Sumit Garg <sumit.garg@linaro.org>,
linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Johan Hovold <johan+linaro@kernel.org>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
Randy Dunlap <rdunlap@infradead.org>,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-efi@vger.kernel.org
Subject: [PATCH v9 1/6] efi: expose efivar generic ops register function
Date: Fri, 13 Oct 2023 16:45:34 +0900 [thread overview]
Message-ID: <20231013074540.8980-2-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20231013074540.8980-1-masahisa.kojima@linaro.org>
This is a preparation for supporting efivar operations
provided by other than efi subsystem.
Both register and unregister functions are exposed
so that non-efi subsystem can revert the efi generic
operation.
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Co-developed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
drivers/firmware/efi/efi.c | 12 ++++++++++++
include/linux/efi.h | 3 +++
2 files changed, 15 insertions(+)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1599f1176842..53ae25bbb6ac 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -231,6 +231,18 @@ static void generic_ops_unregister(void)
efivars_unregister(&generic_efivars);
}
+void efivars_generic_ops_register(void)
+{
+ generic_ops_register();
+}
+EXPORT_SYMBOL_GPL(efivars_generic_ops_register);
+
+void efivars_generic_ops_unregister(void)
+{
+ generic_ops_unregister();
+}
+EXPORT_SYMBOL_GPL(efivars_generic_ops_unregister);
+
#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
#define EFIVAR_SSDT_NAME_MAX 16UL
static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata;
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 5a1e39df8b26..3ade74795ea9 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1354,4 +1354,7 @@ 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);
+void efivars_generic_ops_register(void);
+void efivars_generic_ops_unregister(void);
+
#endif /* _LINUX_EFI_H */
--
2.30.2
next prev parent reply other threads:[~2023-10-13 7:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 7:45 [PATCH v9 0/6] introduce tee-based EFI Runtime Variable Service Masahisa Kojima
2023-10-13 7:45 ` Masahisa Kojima [this message]
2023-10-13 7:45 ` [PATCH v9 2/6] efi: Add EFI_ACCESS_DENIED status code Masahisa Kojima
2023-10-13 7:45 ` [PATCH v9 3/6] efi: Add tee-based EFI variable driver Masahisa Kojima
2023-10-13 7:45 ` [PATCH v9 4/6] efivarfs: automatically update super block flag Masahisa Kojima
2023-12-11 10:02 ` Ard Biesheuvel
2023-12-12 5:39 ` Masahisa Kojima
2023-12-12 7:11 ` Ard Biesheuvel
2023-12-12 7:13 ` Ilias Apalodimas
2023-10-13 7:45 ` [PATCH v9 5/6] efivarfs: force RO when remounting if SetVariable is not supported Masahisa Kojima
2023-10-18 11:51 ` Ilias Apalodimas
2023-10-13 7:45 ` [PATCH v9 6/6] tee: optee: restore efivars ops when tee-supplicant stops Masahisa Kojima
2023-10-13 7:59 ` Sumit Garg
2023-11-07 4:36 ` Masahisa Kojima
2023-10-18 11:35 ` [PATCH v9 0/6] introduce tee-based EFI Runtime Variable Service Ilias Apalodimas
2023-10-27 7:26 ` Masahisa Kojima
2023-11-01 6:56 ` Ilias Apalodimas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231013074540.8980-2-masahisa.kojima@linaro.org \
--to=masahisa.kojima@linaro.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=ardb@kernel.org \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jan.kiszka@siemens.com \
--cc=jens.wiklander@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=rdunlap@infradead.org \
--cc=sumit.garg@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®