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, 22 Jul 2015 11:46:03 +0800
From:	Chunyan Zhang <zhang.chunyan@...aro.org>
To:	rostedt@...dmis.org, mingo@...nel.org
Cc:	mathieu.poirier@...aro.org, serge.broslavsky@...aro.org,
	broonie@...nel.org, alexander.shishkin@...ux.intel.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH v4 3/3] trace: Add an output of trace event logs to STM

When the trace event happens, the traces would be committed to ring buffer.
This patch will add an output of the traces to an STM at this moment,
of course the precondition is TRACE_EVENT_STM be configured.

Signed-off-by: Chunyan Zhang <zhang.chunyan@...aro.org>
---
 kernel/trace/trace_events.c | 2 ++
 kernel/trace/trace_output.h | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 404a372..35fd171 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -249,6 +249,8 @@ void trace_event_buffer_commit(struct trace_event_buffer *fbuffer)
 	event_trigger_unlock_commit(fbuffer->trace_file, fbuffer->buffer,
 				    fbuffer->event, fbuffer->entry,
 				    fbuffer->flags, fbuffer->pc);
+
+	trace_event_stm_log(fbuffer);
 }
 EXPORT_SYMBOL_GPL(trace_event_buffer_commit);
 
diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h
index 4cbfe85..28e25e9 100644
--- a/kernel/trace/trace_output.h
+++ b/kernel/trace/trace_output.h
@@ -41,5 +41,12 @@ extern struct rw_semaphore trace_event_sem;
 #define SEQ_PUT_HEX_FIELD(s, x)				\
 	trace_seq_putmem_hex(s, &(x), sizeof(x))
 
+#ifdef CONFIG_TRACE_EVENT_STM
+extern void stm_trace_event_write(const char *buf, unsigned len);
+extern void trace_event_stm_log(struct trace_event_buffer *buffer);
+#else
+static inline void trace_event_stm_log(struct trace_event_buffer *buffer) {}
+#endif
+
 #endif
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ