mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"mingo@elte.hu" <mingo@elte.hu>, Joe Mario <jmario@redhat.com>,
	Don Zickus <dzickus@redhat.com>, Jiri Olsa <jolsa@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 1/2] perf/x86: update Haswell PEBS event constraints
Date: Mon, 23 Jun 2014 07:16:26 -0700	[thread overview]
Message-ID: <20140623141626.GB8178@tassilo.jf.intel.com> (raw)
In-Reply-To: <20140623073500.GJ19860@laptop.programming.kicks-ass.net>

On Mon, Jun 23, 2014 at 09:35:00AM +0200, Peter Zijlstra wrote:
> On Thu, Jun 19, 2014 at 01:40:41PM -0700, Andi Kleen wrote:
> > On Thu, Jun 19, 2014 at 10:31:29PM +0200, Stephane Eranian wrote:
> > > On Thu, Jun 19, 2014 at 10:18 PM, Andi Kleen <ak@linux.intel.com> wrote:
> > > >> I don't quite understand that.
> > > >> You need to know which events support PEBS. You need a table
> > > >
> > > > We're talking about the kernel allowing things here.
> > > > Yes the user still needs to know what supports PEBS, but
> > > > that doesn't concern the kernel.
> > > >
> > > Just need to make sure you don't return bogus information.
> > 
> > GIGO. We only need to prevent security issues.
> 
> > Yes if the user specifies a bogus raw event it will not count.
> > That's fine. The important part is just that nothing ever crashes.
> 
> Right. But IIRC you were previously arguing that we can in fact crash
> the machine with raw PEBS events, as illustrated with the SNB PEBS
> cycles 'event'.

The potential problem could only happen for a recognized PEBS event/umask,
but with unsupported flag combinations. That is what the SDM warns
about in 18.8.4.

If the event is not recognized as PEBS it will just effectively 
disable the event.

> Which is where my strict_pebs patch came from; by default only allow the
> sanitized known-safe list of events, but allow the system administrator
> to disable that test and allow any PEBS event.

I don't think we need to enforce the list of events
(except for the few with special limited counters)

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2014-06-23 14:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 15:58 [PATCH 0/2] perf/x86: improve Intel load latency and precise store " Stephane Eranian
2014-06-19 15:58 ` [PATCH 1/2] perf/x86: update Haswell PEBS " Stephane Eranian
2014-06-19 18:00   ` Andi Kleen
2014-06-19 19:53     ` Stephane Eranian
2014-06-19 20:18       ` Andi Kleen
2014-06-19 20:31         ` Stephane Eranian
2014-06-19 20:40           ` Andi Kleen
2014-06-19 20:45             ` Stephane Eranian
2014-06-20 13:44               ` Stephane Eranian
2014-06-23  7:35             ` Peter Zijlstra
2014-06-23 14:16               ` Andi Kleen [this message]
2014-06-23  7:14     ` Peter Zijlstra
2014-06-23  8:06       ` Stephane Eranian
2014-06-23 11:37         ` Peter Zijlstra
2014-06-23 11:51           ` Stephane Eranian
2014-06-23 15:47           ` Andi Kleen
2014-06-23  7:12   ` Peter Zijlstra
2014-06-19 15:58 ` [PATCH 2/2] perf/x86: fix constraints for load latency and precise events Stephane Eranian
2014-06-19 20:56   ` Andi Kleen
2014-06-23  8:42   ` Peter Zijlstra
2014-06-23  9:00     ` Stephane Eranian
2014-06-23 11:39       ` Peter Zijlstra
2014-06-23 14:22       ` Andi Kleen

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=20140623141626.GB8178@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=eranian@google.com \
    --cc=jmario@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®