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:	Tue, 30 Dec 2008 22:09:36 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
Subject: Re: [PATCH] tracing/kmemtrace: normalize the raw tracer event to
	the unified tracing API

On Tue, Dec 30, 2008 at 04:37:52PM +0100, Ingo Molnar wrote:
> 
> * Frederic Weisbecker <fweisbec@...il.com> wrote:
> 
> > On Tue, Dec 30, 2008 at 09:16:00AM +0100, Ingo Molnar wrote:
> > > 
> > > * Pekka Enberg <penberg@...helsinki.fi> wrote:
> > > 
> > > > Hi Frederic,
> > > > 
> > > > On Mon, 2008-12-29 at 23:09 +0100, Frederic Weisbecker wrote:
> > > > > Pekka, note that I would be pleased to add statistical tracing on
> > > > > this tracer, but I would need a hashtable, or an array, or a list, or whatever
> > > > > iterable to insert the data into the stat tracing api.
> > > > > 
> > > > > But I don't know your projects about this... whether you wanted to use a section
> > > > > or something else...
> > > > 
> > > > It really depends on what we're tracing. If we're interested in just the 
> > > > allocation hotspots, a section will do just fine. However, if we're 
> > > > tracing memory footprint, we need to take into store the object pointer 
> > > > returned from kmalloc() and kmem_cache_alloc() so we can update 
> > > > call-site statistics properly upon kfree().
> > > > 
> > > > So I suppose we need both, a section for per call-site statistics and a 
> > > > hash table for the object -> call-site mapping.
> > > 
> > > 1)
> > > 
> > > i think the call_site based tracking should be a built-in capability - the 
> > > branch tracer needs that too for example. That would also make it very 
> > > simple on the usage place: you wouldnt have to worry about sections in 
> > > slub.c/etc.
> > 
> > 
> > I think that too. Can we use sections here? The traced functions are not 
> > directly kmalloc/kmem_cache_alloc and to use a section which contains 
> > the per site allocation requests, such a thing is required (we can't 
> > build a section with per site allocations requests by using intermediate 
> > level allocation function I fear...).
> 
> i think initially this should be a fixed-size allocation array + hash as 
> well. (like lockdep uses) The number of allocation sites is even the most 
> extreme case at most a few thousand - and is typically at most a couple of 
> hundred.
> 
> 	Ingo

Why not. And if someone reports too much overruns, we could make the size of this
array an option for the kernel.

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