lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250318-plat2faux_dev-v2-6-e6cc73f78478@arm.com>
Date: Tue, 18 Mar 2025 17:01:44 +0000
From: Sudeep Holla <sudeep.holla@....com>
To: linux-kernel@...r.kernel.org
Cc: Sudeep Holla <sudeep.holla@....com>, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 Ard Biesheuvel <ardb@...nel.org>, linux-efi@...r.kernel.org
Subject: [PATCH v2 6/8] efi: efivars: Transition to the faux device
 interface

The "efivars" platform device is created just to enable the efi-pstore
module to autoload based on it. It doesn't have to be platform device
though. Originally, this approach was chosen for simplicity when the
driver was first implemented.

With the introduction of the lightweight faux device interface, we now
have a more appropriate alternative. Migrate this efivars device to
utilize the faux bus, given that the platform device it previously
created was not a real one anyway.

The modalias is retained here as efi-pstore module is dependent on it.

Cc: Ard Biesheuvel <ardb@...nel.org>
Cc: linux-efi@...r.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@....com>
---
 drivers/firmware/efi/efi-pstore.c | 2 +-
 drivers/firmware/efi/efi.c        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
index a253b61449459eca31afc6ca780a20c4557659ba..eed756a59bba3b5a58cd2e238400c3c12fd5edd5 100644
--- a/drivers/firmware/efi/efi-pstore.c
+++ b/drivers/firmware/efi/efi-pstore.c
@@ -301,4 +301,4 @@ module_exit(efivars_pstore_exit);
 
 MODULE_DESCRIPTION("EFI variable backend for pstore");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:efivars");
+MODULE_ALIAS("faux:efivars");
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 862b7744c28ecc9e5a64bbb3533c34119f50267f..dc5c24a7ca540cac342ceddcdbf75b55bf82c889 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -24,7 +24,7 @@
 #include <linux/initrd.h>
 #include <linux/io.h>
 #include <linux/kexec.h>
-#include <linux/platform_device.h>
+#include <linux/device/faux.h>
 #include <linux/random.h>
 #include <linux/reboot.h>
 #include <linux/slab.h>
@@ -443,7 +443,7 @@ static int __init efisubsys_init(void)
 		error = efivar_ssdt_load();
 		if (error)
 			pr_err("efi: failed to load SSDT, error %d.\n", error);
-		platform_device_register_simple("efivars", 0, NULL, 0);
+		faux_device_create("efivars", NULL, NULL);
 	}
 
 	BLOCKING_INIT_NOTIFIER_HEAD(&efivar_ops_nh);

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ