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
| ||
|
Message-Id: <20140619213329.478113470@goodmis.org> Date: Thu, 19 Jun 2014 17:33:29 -0400 From: Steven Rostedt <rostedt@...dmis.org> To: linux-kernel@...r.kernel.org Cc: Linus Torvalds <torvalds@...ux-foundation.org>, Ingo Molnar <mingo@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Jiri Kosina <jkosina@...e.cz>, Michal Hocko <mhocko@...e.cz>, Jan Kara <jack@...e.cz>, Frederic Weisbecker <fweisbec@...il.com>, Dave Anderson <anderson@...hat.com>, Petr Mladek <pmladek@...e.cz> Subject: [RFC][PATCH 0/3] x86/nmi: Print all cpu stacks from NMI safely This is my proposal to print the NMI stack traces from an RCU stall safely. Here's the gist of it. Patch 1: move the trace_seq out of the tracing code. It's useful for other purposes too. Like writing from an NMI context. Patch 2: Add a per_cpu "printk_func" that printk calls. By default it calls vprintk_def() which does what it has always done. This allows us to override what printk() calls normally on a per cpu basis. Patch 3: Have the NMI handler that dumps the stack trace just change the printk_func to call a NMI safe printk function that writes to a per cpu trace_seq. When all NMI handlers chimed in, the original caller prints out the trace_seqs for each CPU from a printk safe context. This is much less intrusive than the other versions out there. Note, The biggest change was the moving of trace_seq code out of trace_output.c and into the new trace_seq.c library. Thoughts? Steven Rostedt (Red Hat) (3): trace_seq: Move the trace_seq code to lib/ printk: Add per_cpu printk func to allow printk to be diverted x86/nmi: Perform a safe NMI stack trace on all CPUs ---- arch/x86/kernel/apic/hw_nmi.c | 66 ++++++++- include/linux/percpu.h | 3 + include/linux/printk.h | 2 + include/linux/trace_seq.h | 68 ++-------- kernel/printk/printk.c | 38 ++++-- kernel/trace/trace.c | 24 ---- kernel/trace/trace_output.c | 268 ------------------------------------- kernel/trace/trace_output.h | 16 --- lib/Makefile | 2 +- lib/trace_seq.c | 303 ++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 412 insertions(+), 378 deletions(-) -- 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