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: <20240112131857.900734-6-nfraprado@collabora.com>
Date: Fri, 12 Jan 2024 10:18:34 -0300
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Tzung-Bi Shih <tzungbi@...nel.org>
Cc: kernel@...labora.com,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	chrome-platform@...ts.linux.dev,
	Nícolas F. R. A. Prado <nfraprado@...labora.com>,
	Brian Norris <briannorris@...omium.org>,
	Julius Werner <jwerner@...omium.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v2 5/7] firmware: google: memconsole: Add to module device table

Create an id table and add it to the module device table to allow the
memconsole driver to be automatically loaded when a matching device is
found.

Suggested-by: Brian Norris <briannorris@...omium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>

---

Changes in v2:
- Added this commit

 drivers/firmware/google/memconsole-coreboot.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/firmware/google/memconsole-coreboot.c b/drivers/firmware/google/memconsole-coreboot.c
index 74b5286518ee..b8e65b9d8cc0 100644
--- a/drivers/firmware/google/memconsole-coreboot.c
+++ b/drivers/firmware/google/memconsole-coreboot.c
@@ -11,6 +11,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 
 #include "memconsole.h"
 #include "coreboot_table.h"
@@ -96,6 +97,12 @@ static void memconsole_remove(struct coreboot_device *dev)
 	memconsole_exit();
 }
 
+static const struct coreboot_device_id memconsole_ids[] = {
+	{ .tag = CB_TAG_CBMEM_CONSOLE },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(coreboot, memconsole_ids);
+
 static struct coreboot_driver memconsole_driver = {
 	.probe = memconsole_probe,
 	.remove = memconsole_remove,
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ