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, 10 Aug 2011 15:16:27 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	Jason Baron <jbaron@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...e.hu>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Peter Zijlstra <peterz@...radead.org>, tglx@...utronix.de
Subject: Re: [RFC PATCH][3.0] Tracepoint: dissociate from module mutex

* Jason Baron (jbaron@...hat.com) wrote:
> On Wed, Aug 10, 2011 at 01:41:01PM -0400, Mathieu Desnoyers wrote:
> > Copy the information needed from struct module into a local module list
> > held within tracepoint.c from within the module coming/going notifier.
> > 
> > This vastly simplifies locking of tracepoint registration /
> > unregistration, because we don't have to take the module mutex to
> > register and unregister tracepoints anymore. Steven Rostedt ran into
> > dependency problems related to modules mutex vs kprobes mutex vs ftrace
> > mutex vs tracepoint mutex that seems to be hard to fix without removing
> > this dependency between tracepoint and module mutex. (note: it should be
> > investigated whether kprobes could benefit of being dissociated from the
> > modules mutex too.)
> > 
> > This also fixes module handling of tracepoint list iterators, because it
> > was expecting the list to be sorted by pointer address. Given we have
> > control on our own list now, it's OK to sort this list which has
> > tracepoints as its only purpose. The reason why this sorting is required
> > is to handle the fact that seq files (and any read() operation from
> > user-space) cannot hold the tracepoint mutex across multiple calls, so
> > list entries may vanish between calls. With sorting, the tracepoint
> > iterator becomes usable even if the list don't contain the exact item
> > pointed to by the iterator anymore.
> > 
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> > CC: Steven Rostedt <rostedt@...dmis.org>
> > CC: Ingo Molnar <mingo@...e.hu>
> > CC: Lai Jiangshan <laijs@...fujitsu.com>
> > CC: Peter Zijlstra <peterz@...radead.org>
> > CC: tglx@...utronix.de
> > ---
> >  include/linux/module.h     |   12 ---
> >  include/linux/tracepoint.h |   25 +++---
> >  kernel/module.c            |   47 ------------
> >  kernel/tracepoint.c        |  165 +++++++++++++++++++++++++++++++++++++++------
> >  4 files changed, 156 insertions(+), 93 deletions(-)
> 
> Hi Mathieu,
> 
> This is similar to the approach we have taken in the jump label code -
> on module insert/remove we store pointers into module table, so that we
> don't require the module_mutex during update time. It has been working
> well there, so this design makes sense to me at least.

OK, I'll add your acked-by. Thanks!

Mathieu

> 
> Thanks,
> 
> -Jason

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
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