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]
Date:   Wed, 29 Nov 2023 07:50:31 +0000
From:   Muralidhara M K <muralimk@....com>
To:     <linux-edac@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>, <bp@...en8.de>,
        <mchehab@...nel.org>, Muralidhara M K <muralidhara.mk@....com>,
        Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>
Subject: [PATCH 1/4] ACPI/APEI: Add erst_get_size() API

From: Muralidhara M K <muralidhara.mk@....com>

Support API for size of a record in the ERST.

Co-developed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>
Signed-off-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>
Signed-off-by: Muralidhara M K <muralidhara.mk@....com>
---
 drivers/acpi/apei/erst.c | 9 +++++++++
 include/acpi/apei.h      | 1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index bf65e3461531..aae1c133095a 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -420,6 +420,15 @@ static int erst_get_erange(struct erst_erange *range)
 	return 0;
 }
 
+u64 erst_get_size(void)
+{
+	if (erst_disable)
+		return 0;
+
+	return erst_erange.size;
+}
+EXPORT_SYMBOL_GPL(erst_get_size);
+
 static ssize_t __erst_get_record_count(void)
 {
 	struct apei_exec_context ctx;
diff --git a/include/acpi/apei.h b/include/acpi/apei.h
index dc60f7db5524..3b34f463ea44 100644
--- a/include/acpi/apei.h
+++ b/include/acpi/apei.h
@@ -41,6 +41,7 @@ static inline void acpi_hest_init(void) { }
 
 int erst_write(const struct cper_record_header *record);
 ssize_t erst_get_record_count(void);
+u64 erst_get_size(void);
 int erst_get_record_id_begin(int *pos);
 int erst_get_record_id_next(int *pos, u64 *record_id);
 void erst_get_record_id_end(void);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ