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-next>] [day] [month] [year] [list]
Date:   Sat, 14 Dec 2019 20:11:09 +0800
From:   Xie XiuQi <xiexiuqi@...wei.com>
To:     <tony.luck@...el.com>, <bp@...en8.de>
CC:     <linux-edac@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] trace: ras: print the raw data of arm processor error info

User space tools such as rasdaemon need the complete error
information from trace event. So, we print the raw data of
error information in arm_event.

In the past, I try to parse them in trace event, but it's
hard to deal the dynamic error item. And in commit 301f55b1a917
("efi: Parse ARM error information value"), the error information
already been parsed to syslog.

So, just print the raw data in trace event for simpler.

Cc: Borislav Petkov <bp@...e.de>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Tyler Baicar <tbaicar@...eaurora.org>
Signed-off-by: Xie XiuQi <xiexiuqi@...wei.com>
---
 include/ras/ras_event.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h
index 36c5c5e38c1d..2023ba9206b3 100644
--- a/include/ras/ras_event.h
+++ b/include/ras/ras_event.h
@@ -180,6 +180,9 @@ TRACE_EVENT(arm_event,
 		__field(u32, running_state)
 		__field(u32, psci_state)
 		__field(u8, affinity)
+		__field(u32, count)
+		__field(u32, len)
+		__dynamic_array(u8, err_info, proc->err_info_num * sizeof(struct cper_arm_err_info))
 	),
 
 	TP_fast_assign(
@@ -199,12 +202,18 @@ TRACE_EVENT(arm_event,
 			__entry->running_state = ~0;
 			__entry->psci_state = ~0;
 		}
+
+		__entry->count = proc->err_info_num;
+		__entry->len = __entry->count * sizeof(struct cper_arm_err_info);
+		memcpy(__get_dynamic_array(err_info), proc + 1, __entry->len);
 	),
 
 	TP_printk("affinity level: %d; MPIDR: %016llx; MIDR: %016llx; "
-		  "running state: %d; PSCI state: %d",
+		  "running state: %d; PSCI state: %d; error count: %d; "
+		  "raw data: %s",
 		  __entry->affinity, __entry->mpidr, __entry->midr,
-		  __entry->running_state, __entry->psci_state)
+		  __entry->running_state, __entry->psci_state, __entry->count,
+		  __print_hex(__get_dynamic_array(err_info), __entry->len))
 );
 
 /*
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ