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: <20140312145802.4819511e@gandalf.local.home>
Date:	Wed, 12 Mar 2014 14:58:02 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc:	"Frank Ch. Eigler" <fche@...hat.com>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Johannes Berg <johannes.berg@...el.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	lttng-dev <lttng-dev@...ts.lttng.org>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [for-next][PATCH 08/20] tracing: Warn if a tracepoint is not
 set via debugfs

On Wed, 12 Mar 2014 18:47:15 +0000 (UTC)
Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:
 
> > On module unload, the events are destroyed.
> 
> Isn't trace_event.c responsible for dealing with tracepoint probes rather
> than call sites ? This is quite different. A tracepoint probe "foo" is only
> located within a single module (the one you are unloading here). However,
> if you try to unload a module that contains the callsite "foo", you have no
> guarantee that no other modules also contain this callsite, and therefore
> you cannot destroy the associated name, probe, nor data objects.

No module should have the same tracepoint name as another module.
That's just broken. Although we do not technically enforce this, in
practice that has been the case.


> 
> > 
> > Thus, what your module should do, is exactly what event_remove() does.
> > On module unload, you unregister any of the tracepoints that were
> > registered. Just like any other module resource. If you request a
> > resource on the behalf of a module, it is up to you to free it when the
> > module is unloaded.
> 
> You seem to try to apply a logic that works in the case of the probes
> defined by trace event to tracepoint call sites, but the fact is that
> they are very different. Or again perhaps I'm just on the wrong track.
> 
> > 
> > The tracepoint code will just destroy what it set up when the module
> > was loaded. It's up to your module to clean up the allocations that you
> > made when the module was loaded on unload. Just like we do for all
> > other resources.
> > 
> > Mathieu, stop thinking that tracepoints are special. They are not.
> 
> I'm trying to understand how module going of tracepoint probes and
> call sites can be considered the same. What am I missing ?

What creates the tracepoint probe? For all purposes, it should be
either created on boot up (on core tracepoints), or when a module is
loaded.

Two modules should not have the same name. Is there any duplicate
tracepoints you are aware of. Namespace collisions in tracepoints
should be avoided, as that would cause people to trace things they did
not intend on tracing.

That should be a new patch as well. Enforce unique tracepoint names.

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