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 v8 1/5] efi: expose efivar generic ops register function
Date: Mon, 7 Aug 2023 11:53:38 +0900 [thread overview]
Message-ID: <20230807025343.1939-2-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20230807025343.1939-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 e9004358f7bd..faea18b42c08 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1364,4 +1364,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 parent reply other threads:[~2023-08-07 2:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230807025343.1939-1-masahisa.kojima@linaro.org>
2023-08-07 2:53 ` Masahisa Kojima [this message]
2023-08-07 2:53 ` [PATCH v8 2/5] efi: Add EFI_ACCESS_DENIED status code Masahisa Kojima
2023-08-07 2:53 ` [PATCH v8 3/5] efi: Add tee-based EFI variable driver Masahisa Kojima
2023-08-08 9:43 ` Jonathan Cameron
2023-08-07 2:53 ` [PATCH v8 4/5] efivarfs: automatically update super block flag Masahisa Kojima
2023-10-11 17:00 ` Ilias Apalodimas
2023-10-13 6:20 ` Masahisa Kojima
2023-10-13 7:53 ` Sumit Garg
2023-10-13 15:25 ` Ilias Apalodimas
2023-10-17 10:58 ` Sumit Garg
2023-10-17 12:55 ` Ilias Apalodimas
2023-08-07 2:53 ` [PATCH v8 5/5] efivarfs: force RO when remounting if SetVariable is not supported Masahisa Kojima
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=20230807025343.1939-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;
as well as URLs for NNTP newsgroup(s).