From: Andi Kleen <andi@firstfloor.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>,
mingo@kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, eranian@google.com,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/2] Fix perf LBR filtering
Date: Thu, 25 Apr 2013 19:42:11 +0200 [thread overview]
Message-ID: <20130425174211.GE16732@two.firstfloor.org> (raw)
In-Reply-To: <20130425171842.GA8669@dyad.programming.kicks-ass.net>
On Thu, Apr 25, 2013 at 07:18:42PM +0200, Peter Zijlstra wrote:
> On Thu, Apr 25, 2013 at 07:00:37PM +0200, Andi Kleen wrote:
> > > Traping the read deals with the first. The second shouldn't be a problem since
> > > we generally only allow kernel info for CAP_ADMIN; if we don't already for LBR
> > > that needs to be fixed separately.
> >
> > Where is that check? I don't see it.
>
> Then that might need fixing.
Ok.
BTW I would just still argue that even paranoid == -1 should not allow
crashes. So even with that added it would still be a problem.
>
> > Also remember that precise == 2 can enable LBR implicitly.
>
> Sure.. but it doesn't need the filter stuff. Now I completely forgot if it will
> actually still use the filter muck.. /me goes check
True. It doesn't filter.
> I think intel_pmu_lbr_filter() will typically bail on the X86_BR_ALL test for
> PEBS fixup, it might only end up in the filter code if precise_br_compat()
> finds another LBR user compatible with the fixup.
Yes it does.
>
> > > That only leaves the third.. can we descern MMIO maps from the kernel page tables?
> >
> > In theory you could use some bits in the PTE for vmalloc, but it would need quite a
> > few changes.
> >
> > Also there may be corner cases where MMIO is in the direct mapping or in
> > the kernel mapping.
>
> Hrmm... do we keep track of the MMIO regions somewhere at all?
There's the non cachable region tracking. But there's no guarantee a
MMIO has to be in there, driver may still rely just on MTRRs. Also
there may be MMIOs the kernel doesn't know about which just happen
to be somewhere in the direct mapping.
I don't see any reliable way to detect all mmios.
-Andi
next prev parent reply other threads:[~2013-04-25 17:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 23:04 [PATCH 1/2] Fix perf LBR filtering Andi Kleen
2013-04-24 23:04 ` [PATCH 2/2] perf, x86: Don't allow unusual PEBS raw flags Andi Kleen
2013-04-29 22:16 ` Stephane Eranian
2013-04-29 22:34 ` Andi Kleen
2013-04-29 23:05 ` Stephane Eranian
2013-05-02 7:37 ` Peter Zijlstra
2013-05-06 17:44 ` Stephane Eranian
2013-05-06 18:52 ` Peter Zijlstra
2013-05-06 22:43 ` Stephane Eranian
2013-05-07 6:48 ` Ingo Molnar
2013-05-07 8:48 ` Peter Zijlstra
2013-05-07 11:04 ` Ingo Molnar
2013-05-07 8:43 ` Peter Zijlstra
2013-04-24 23:20 ` [PATCH 1/2] Fix perf LBR filtering Ben Hutchings
2013-04-24 23:24 ` Greg KH
2013-04-25 16:25 ` Peter Zijlstra
2013-04-25 16:41 ` Andi Kleen
2013-04-25 16:48 ` Peter Zijlstra
2013-04-25 17:00 ` Andi Kleen
2013-04-25 17:18 ` Peter Zijlstra
2013-04-25 17:42 ` Andi Kleen [this message]
2013-04-26 7:56 ` Peter Zijlstra
2013-04-26 19:46 ` Andi Kleen
2013-05-01 11:51 ` Ingo Molnar
2013-05-01 11:55 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130425174211.GE16732@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox