[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110518112259.GG16556@elte.hu>
Date: Wed, 18 May 2011 13:22:59 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Hans Rosenfeld <hans.rosenfeld@....com>
Cc: "hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Richter, Robert" <robert.richter@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Frédéric Weisbecker <fweisbec@...il.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC v3 0/8] x86, xsave: rework of extended state handling, LWP
support
* Hans Rosenfeld <hans.rosenfeld@....com> wrote:
> > Here are a couple of suggestions to LWP hardware designers:
> >
> > - the fact that LWP cannot count kernel events right now is unfortunate -
> > there's no reason not to allow privileged user-space to request ring 3
> > events as well - hopefully this misfeature will be fixed in future
> > iterations of the hardware.
> >
> > - it would be nice to allow the per task masking/unmasking of LWP without
> > having to modify the cr0 (which can be expensive). A third mode
> > implemented in the LWP_CFG MSG would suffice: it would make the LWP
> > instructions privileged, but would otherwise allow LWP event collection
> > to occur even on sandboxed code.
> >
> > - it would be nice to also log the previous retired instruction in the
> > trace entry, to ease decoding of the real instruction that generated
> > an event. (Fused instructions can generate their RIP at the first
> > instruction.)
>
> I will forward this to our hardware designers, but I have my doubts about the
> first two of your suggestions. They seem to be orthogonal to what LWP is
> supposed to be.
Not sure why you think those two suggestions are 'orthogonal to LWP', they are
not:
- the second suggestion adds a third security model to the current
all-or-nothing nature of LWP instructions.
- the first suggestion is a variation of its current security model as well:
it allows LWP driven event collection in kernel mode, not just user mode.
There is nothing fundamentally ring-3-only about the concept of 'light weight
profiling' - while ring-3-only event collection is understandably necessary for
unprivileged user-space, it is not the only interesting mode of lightweight
event collection.
Thanks,
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