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: <20090102223850.GA5235@localhost>
Date:	Sat, 3 Jan 2009 00:38:50 +0200
From:	Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Dipankar Sarma <dipankar@...ibm.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kmemtrace: Use tracepoints instead of markers.

On Fri, Jan 02, 2009 at 04:48:05PM -0500, Mathieu Desnoyers wrote:
> Yes, we could (and maybe should) use __always_inline there. Hrm, which
> which tree to you work ? You probably mean DECLARE_TRACE() rather than
> DEFINE_TRACE() ?
> 
> I just went over your patch again. it uses the old DEFINE_TRACE() API.
> You should get the latest tracepoints which have DECLARE_TRACE() (for
> trace/kmemtrace.h) and then a DEFINE_TRACE() in a .c.  Ah I see, you
> work on 2.6.28. You should work on top of -tip, which has this new API.
> Using the tracepoints present in 2.6.28 will not let you do only a
> single definition of the tracepoint structure and it will lead to waste
> of kernel memory by defining multiple instances of tracepoint structures
> (one for each trace_*() use, so one per kmalloc()). The
> Documentation/tracepoints.txt file is updated accordingly.
> 

I'm supposed to merge it through Ingo's tip tree. If we're talking about
the same tree, I'll do as you suggested.

> > But it is quite pointless. Sometimes we need _RET_IP_, sometimes
> > _THIS_IP_ and sometimes a parameter we've been passed. That's because we
> > want the IP of the caller, so it depends on whether this slab function
> > is __always_inline, non-inlined or deeply nested within other functions
> > (which can be as well __always_inline or non-inlined).
> > 
> 
> Hrm ? In the case we just want
> 
>   trace_kmalloc(_THIS_IP, ......);
> 
> If we have __always_inline for the trace_*() declaration, isn't it the
> same to just do this in the probe ?
> 
> void probe_kmalloc(......)
> {
>   ... _RET_IP_ ...;
> 
> }
> 
> This would remove a parameter from the stack created from the
> instrumentation site, which is always good.

No, it's not always possible. Not all allocator functions (not even
those of the same kind, as in alloc/free) make up an __always_inline
chain. For example, there is one or a few instances where we pass a
value other than _RET_IP_ or _THIS_IP_ to probes. It's quite hard to
untangle things without making extensive modifications.

> Mathieu
> 
> > 
> > 	Eduard
> > 
> 
> -- 
> Mathieu Desnoyers
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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