On Fri, Oct 19, 2012 at 6:27 PM, Peter Zijlstra <pet...@infradead.org> wrote: > On Fri, 2012-10-19 at 16:52 +0200, Stephane Eranian wrote: >> +static int intel_pebs_aliases_snb(struct perf_event *event) >> +{ >> + u64 cfg = event->hw.config; >> + /* >> + * for INST_RETIRED.PREC_DIST to work correctly with PEBS, it must >> + * be measured alone on SNB (exclusive PMU access) as per Intel SDM. >> + */ >> + if ((cfg & INTEL_ARCH_EVENT_MASK) == 0x01c0 && >> !event->attr.exclusive) { >> + pr_info("perf: INST_RETIRED.PREC_DIST only works in >> exclusive mode\n"); >> + return -EINVAL; > > This isn't limited to admin, right? So the above turns into a DoS on the > console. > Ok, so how about a WARN_ON_ONCE() instead? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Re: [PATCH 1/2] perf tools: add event modifi... Jiri Olsa
- Re: [PATCH 1/2] perf tools: add event mo... Stephane Eranian
- Re: [PATCH 1/2] perf tools: add eve... Jiri Olsa
- Re: [PATCH 1/2] perf tools: add... Stephane Eranian
- Re: [PATCH 1/2] perf tools: add event modifi... Andi Kleen
- [PATCH 2/2] perf: SNB exclusive PMU access for INST_RETIR... Stephane Eranian
- Re: [PATCH 2/2] perf: SNB exclusive PMU access for I... Andi Kleen
- Re: [PATCH 2/2] perf: SNB exclusive PMU access f... Stephane Eranian
- Re: [PATCH 2/2] perf: SNB exclusive PMU access for I... Peter Zijlstra
- Re: [PATCH 2/2] perf: SNB exclusive PMU access f... Stephane Eranian
- Re: [PATCH 2/2] perf: SNB exclusive PMU acce... Peter Zijlstra
- Re: [PATCH 2/2] perf: SNB exclusive PMU ... Andi Kleen
- Re: [PATCH 2/2] perf: SNB exclusive... Ingo Molnar
- Re: [PATCH 2/2] perf: SNB exclu... Stephane Eranian
- Re: [PATCH 2/2] perf: SNB exclu... Ingo Molnar
- Re: [PATCH 2/2] perf: SNB exclu... Stephane Eranian
- Re: [PATCH 2/2] perf: SNB exclu... Ingo Molnar