[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120710094803.GA14821@gmail.com>
Date: Tue, 10 Jul 2012 11:48:03 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, hpa@...or.com,
eranian@...gle.com, linux-kernel@...r.kernel.org,
fweisbec@...il.com, akpm@...ux-foundation.org, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org,
Robert Richter <robert.richter@....com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [tip:perf/core] perf/x86: Fix USER/KERNEL tagging of samples
* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Tue, 2012-07-10 at 10:21 +0200, Ingo Molnar wrote:
> > Another boundary condition would be when we intentionally
> > twiddle the GDT: such as during suspend or during BIOS upcalls.
> > Can we then get a PMU interrupt? If yes then this will probably
> > result in garbage:
> >
> > > > > + desc = __this_cpu_ptr(&gdt_page.gdt[0]);
> >
> > it won't outright crash, we don't ever deallocate our GDT - but
> > it will return a garbage RIP.
>
> Nothing we can do about that though..
We could read out the current GDT [the SGDT instruction] instead
of looking at gdt_page.
Then we'd have to decode that descriptor, the limit. Decide
whether the selector points to the GDT or LDT. All the fun x86
legacies that we mostly forgot already after two decades of
running the kernel in flat linear mode...
> > Then there's also all the Xen craziness with segments ...
>
> I don't think Xen Dom0 has PMU access, that would be their
> Hyper-visor thingy's job, no?
Unless Xen is destined to become dead code it will eventually be
interested in PMU based measurements, right?
> Anyway, that seems a problem for Jeremy and Konrad..
Yeah, quite probably so.
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