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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Jul 2014 14:31:40 +0200
From:	Petr Mladek <pmladek@...e.cz>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	Petr Mladek <pmladek@...e.cz>
Subject: [PATCH v4 0/3] ring-buffer/ftrace: Race when writing and swapping cpu buffer in parallel

OK, I ended with these changes after changing my mind few times and hopefully
better understanding the aspects of preemption, interrupts, locking, and
scheduling.

1st patch fixes the race in ring_buffer_swap_cpu(). It is the one from previous
versions. I have only added checks for irqs_disabled() as suggested by Steven.

2nd patch should be easy. It only makes sure that we are on the same CPU
when handling the critical timings.

3rd patch was the most problematic for me. It creates two variants
of smp_call_function_single() that could be called either with or without
disabled interrupts. It is what Steven suggested but I wonder if it could
be done more elegant way. I am in somewhat strange mode after the twins were
born on Thursday.

Petr Mladek (3):
  ring-buffer: Race when writing and swapping cpu buffer in parallel
  trace: process entire stop_critical_timing() on the same CPU
  trace: Allow to call update_max_tr_single() from another CPU

 kernel/trace/ring_buffer.c   | 115 ++++++++++++++++++++++++++++++-------------
 kernel/trace/trace.c         |  60 +++++++++++++++++++---
 kernel/trace/trace.h         |   1 +
 kernel/trace/trace_irqsoff.c |  17 +++++--
 4 files changed, 146 insertions(+), 47 deletions(-)

-- 
1.8.4

--
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