[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091217105103.GA26010@elte.hu>
Date: Thu, 17 Dec 2009 11:51:03 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 2/2] perf lock: Fix output of tracing lock events
* Peter Zijlstra <peterz@...radead.org> wrote:
> On Thu, 2009-12-17 at 11:09 +0100, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > > > TP_STRUCT__entry(
> > > > + __field(struct lockdep_map *, lockdep_addr)
> > > > __field(unsigned int, flags)
> > > > __string(name, lock->name)
> > > > ),
> > >
> > > I feel a bit awkward explicitly leaking kernel pointers like that. All this
> > > is accessible by root only (for now) so its not too harmfull, but sitll.
> >
> > What would you suggest as a 'natural lock class key'? The name? It might not
> > be unique enough.
> >
> > Other kernel objects like tasks, cpus, inodes, pages all have some natural key
> > that isnt a kernel pointer - but locks are a bit special.
>
> Well, yeah, that's the problem, and we use the pointer for exactly this
> purpose inside the kernel too, its just that its a blatant data leak when we
> expose it to userspace like that.
>
> On the other hand, adding some ID generation just so we can expose it seems
> silly too.
>
> Why do we need to have instance resolution?
Does the tool make use of it to classify stats?
Ingo
--
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