Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-24 Thread Jiri Olsa
On Thu, Apr 30, 2015 at 03:08:56PM -0400, Vince Weaver wrote: > > So the perf_fuzzer caught this after about a week of fuzzing on a Haswell > machine running a recent git kernel (pre 4.1-rc1 though). > > We've seen this BUG before and various fixes were applied but apparently > it wasn't enough

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-20 Thread Peter Zijlstra
On Wed, May 20, 2015 at 05:26:07PM +0200, Peter Zijlstra wrote: > Except of course that ->event_init() likes to do an allocation :/ > > Needs to be fixed differently. So this puts the lock in the x86 code, it seems to build and run. But my brain is fried after staring at this pmu scheduling code

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-20 Thread Peter Zijlstra
On Wed, May 20, 2015 at 03:49:22PM +0200, Peter Zijlstra wrote: > --- > kernel/events/core.c |5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/kernel/events/core.c b/kernel/events/core.c > index 1a3bf48..a4f93fb 100644 > --- a/kernel/events/core.c > +++ b/kernel/even

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-20 Thread Peter Zijlstra
On Wed, May 20, 2015 at 03:03:12PM +0200, Peter Zijlstra wrote: > Now, I've not quite figured out how that can intersect with scheduling, > typically we only call put_event_constraints() when we're done with the > event. Ah, yes, I think I've found it. We can do actual scheduling during perf_try

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-20 Thread Peter Zijlstra
On Wed, May 20, 2015 at 03:03:12PM +0200, Peter Zijlstra wrote: > So new in this release is: > > static void intel_put_event_constraints(struct cpu_hw_events *cpuc, > struct perf_event *event) > { > ... > > /* cleanup dynamic constraint */ >

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-20 Thread Peter Zijlstra
On Mon, May 18, 2015 at 01:40:31PM -0400, Vince Weaver wrote: > On Thu, 7 May 2015, Peter Zijlstra wrote: > > > On Mon, May 04, 2015 at 12:32:56PM -0700, Stephane Eranian wrote: > > > I think it is more likely related to the bitmask (idxmsk). But then > > > it is always allocated with the constra

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-18 Thread Vince Weaver
On Thu, 7 May 2015, Peter Zijlstra wrote: > On Mon, May 04, 2015 at 12:32:56PM -0700, Stephane Eranian wrote: > > I think it is more likely related to the bitmask (idxmsk). But then > > it is always allocated with the constraint even with the HT bug > > workaround. So most, likely the index is b

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-07 Thread Vince Weaver
On Thu, 7 May 2015, Peter Zijlstra wrote: > Indeed so; and we can make an analogous argument for hwc. However: > > > I think it is more likely related to the bitmask (idxmsk). But then > > it is always allocated with the constraint even with the HT bug > > workaround. So most, likely the index

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-07 Thread Peter Zijlstra
On Mon, May 04, 2015 at 12:32:56PM -0700, Stephane Eranian wrote: > On Fri, May 1, 2015 at 5:59 AM, Peter Zijlstra wrote: > > > > On Thu, Apr 30, 2015 at 03:08:56PM -0400, Vince Weaver wrote: > > > > > > So the perf_fuzzer caught this after about a week of fuzzing on a Haswell > > > machine runnin

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-04 Thread Stephane Eranian
On Fri, May 1, 2015 at 5:59 AM, Peter Zijlstra wrote: > > On Thu, Apr 30, 2015 at 03:08:56PM -0400, Vince Weaver wrote: > > > > So the perf_fuzzer caught this after about a week of fuzzing on a Haswell > > machine running a recent git kernel (pre 4.1-rc1 though). > > > > We've seen this BUG before

Re: perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-05-01 Thread Peter Zijlstra
On Thu, Apr 30, 2015 at 03:08:56PM -0400, Vince Weaver wrote: > > So the perf_fuzzer caught this after about a week of fuzzing on a Haswell > machine running a recent git kernel (pre 4.1-rc1 though). > > We've seen this BUG before and various fixes were applied but apparently > it wasn't enough

perf: fuzzer triggers NULL pointer derefreence in x86_schedule_events

2015-04-30 Thread Vince Weaver
So the perf_fuzzer caught this after about a week of fuzzing on a Haswell machine running a recent git kernel (pre 4.1-rc1 though). We've seen this BUG before and various fixes were applied but apparently it wasn't enough. Sadly it doesn't seem to be reproducible. validate_group() -> x86_pmu.