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, 08 Oct 2011 13:02:27 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	linux-kernel@...r.kernel.org
Cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: [PATCH 0/3][RFC] trace_printk() using percpu buffers

Peter,

You had issues with the previous version of my trace_printk() code.
I rewrote it to do the following.

By default, it still uses the single buffer protected by a spinlock
and an atomic (for NMIs). The NMI case can cause dropped prints if
the NMI happens while a trace_printk() is processing.

When trace_printk_percpu is enabled, either via the trace options or
the kernel command line, then two sets of percpu buffers are made,
one for normal and irqs (interrupts are still disabled), and the other
is for NMIs. These can be added or removed at anytime.

The last patch adds a CONFIG_TRACE_PRINTK_PERCPU that makes trace_printk()
permanently use two sets of per_cpu buffers, and these can not be
removed. This will give the least amount of overhead for trace_printk()
with the sacrifice of memory overhead. This is an option I could imagine
you would just set and forget about.

Let me know your thoughts.

Thanks,

-- Steve


Steven Rostedt (3):
      tracing: Do not allocate buffer for trace_marker
      tracing: Add optional percpu buffers for trace_printk()
      tracing: Add config to permanently have trace_printk() use percpu buffers

----
 Documentation/kernel-parameters.txt |   11 +
 kernel/trace/Kconfig                |   18 ++
 kernel/trace/trace.c                |  360 ++++++++++++++++++++++++++++-------
 kernel/trace/trace.h                |    1 +
 4 files changed, 320 insertions(+), 70 deletions(-)

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ