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: <20240306020005.944149230@goodmis.org>
Date: Tue, 05 Mar 2024 20:59:14 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
 Mark Rutland <mark.rutland@....com>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Vincent Donnefort <vdonnefort@...gle.com>,
 Joel Fernandes <joel@...lfernandes.org>,
 Daniel Bristot de Oliveira <bristot@...hat.com>,
 Ingo Molnar <mingo@...nel.org>,
 Peter Zijlstra <peterz@...radead.org>,
 suleiman@...gle.com,
 Thomas Gleixner <tglx@...utronix.de>,
 Vineeth Pillai <vineeth@...byteword.org>,
 Youssef Esmat <youssefesmat@...gle.com>,
 Beau Belgrave <beaub@...ux.microsoft.com>,
 Alexander Graf <graf@...zon.com>,
 Baoquan He <bhe@...hat.com>,
 Borislav Petkov <bp@...en8.de>,
 "Paul E. McKenney" <paulmck@...nel.org>,
 David Howells <dhowells@...hat.com>
Subject: [PATCH 4/8] HACK: Hard code in mapped tracing buffer address

From: "Steven Rostedt (Google)" <rostedt@...dmis.org>

Do not submit!

This is for testing purposes only. It hard codes an address that I was
using to store the ring buffer range. How the memory actually gets mapped
will be another project.

Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
---
 arch/x86/kernel/setup.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 84201071dfac..dcba729349d3 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -26,6 +26,8 @@
 #include <linux/swiotlb.h>
 #include <linux/random.h>
 
+#include <linux/trace.h>
+
 #include <uapi/linux/mount.h>
 
 #include <xen/xen.h>
@@ -1106,6 +1108,24 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	arch_reserve_crashkernel();
 
+	trace_buffer_size = 12582912;
+	{
+		phys_addr_t ftrace_addr;
+		unsigned long phys_start = 0x285400000;
+		unsigned long phys_end = phys_start + trace_buffer_size + 1024*1024;
+
+		ftrace_addr = memblock_phys_alloc_range(trace_buffer_size, 4096,
+							phys_start, phys_end);
+		if (ftrace_addr) {
+			printk("MEMORY ALLOC %lx-%lx\n", (long)ftrace_addr,
+			       (long)ftrace_addr + trace_buffer_size);
+			trace_buffer_start = (unsigned long)__va(ftrace_addr);
+			printk("MEMORY ADDR %lx-%lx\n", trace_buffer_start,
+			       trace_buffer_start + trace_buffer_size);
+		} else
+			printk("MEMORY FAILED\n");
+	}
+
 	memblock_find_dma_reserve();
 
 	if (!early_xdbc_setup_hardware())
-- 
2.43.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ