Re: perf,arm -- oops in validate_event

2013-08-07 Thread Will Deacon
On Wed, Aug 07, 2013 at 04:30:33PM +0100, Vince Weaver wrote: > On Wed, 7 Aug 2013, Vince Weaver wrote: > > On Wed, 7 Aug 2013, Will Deacon wrote: > > > diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c > > > index d9f5cd4..0500f10b 100644 > > > --- a/arch/arm/kernel/perf_eve

Re: perf,arm -- oops in validate_event

2013-08-07 Thread Vince Weaver
On Wed, 7 Aug 2013, Mark Rutland wrote: > On Wed, Aug 07, 2013 at 02:00:27PM +0100, Will Deacon wrote: > > On Tue, Aug 06, 2013 at 02:08:15PM +0100, Mark Rutland wrote: > > > On Tue, Aug 06, 2013 at 12:59:21PM +0100, Will Deacon wrote: > > Ok, so the following quick hack below should solve the iss

Re: perf,arm -- oops in validate_event

2013-08-07 Thread Vince Weaver
On Wed, 7 Aug 2013, Vince Weaver wrote: > On Wed, 7 Aug 2013, Will Deacon wrote: > > > Ok, so the following quick hack below should solve the issue (can you > > confirm > > it please, since I don't have access to any hardware atm?) > > > > We should revisit this for 3.12 though, because I'm not

Re: perf,arm -- oops in validate_event

2013-08-07 Thread Vince Weaver
On Wed, 7 Aug 2013, Will Deacon wrote: > Ok, so the following quick hack below should solve the issue (can you confirm > it please, since I don't have access to any hardware atm?) > > We should revisit this for 3.12 though, because I'm not sure that our > validation code even does the right thing

Re: perf,arm -- oops in validate_event

2013-08-07 Thread Mark Rutland
On Wed, Aug 07, 2013 at 02:00:27PM +0100, Will Deacon wrote: > On Tue, Aug 06, 2013 at 02:08:15PM +0100, Mark Rutland wrote: > > On Tue, Aug 06, 2013 at 12:59:21PM +0100, Will Deacon wrote: > > > But we already check `event->pmu != leader_pmu' in validate_event, so we > > > shouldn't get anywhere n

Re: perf,arm -- oops in validate_event

2013-08-07 Thread Will Deacon
On Tue, Aug 06, 2013 at 02:08:15PM +0100, Mark Rutland wrote: > On Tue, Aug 06, 2013 at 12:59:21PM +0100, Will Deacon wrote: > > But we already check `event->pmu != leader_pmu' in validate_event, so we > > shouldn't get anywhere nearer calling get_event_idx in the case you > > describe. It sounds m

Re: perf,arm -- oops in validate_event

2013-08-06 Thread Mark Rutland
On Tue, Aug 06, 2013 at 12:59:21PM +0100, Will Deacon wrote: > On Tue, Aug 06, 2013 at 12:19:32PM +0100, Mark Rutland wrote: > > On Mon, Aug 05, 2013 at 10:17:37PM +0100, Vince Weaver wrote: > > > It looks like in validate_event() we do > > > > > > struct arm_pmu *armpmu = to_arm_pmu(event

Re: perf,arm -- oops in validate_event

2013-08-06 Thread Will Deacon
On Tue, Aug 06, 2013 at 12:19:32PM +0100, Mark Rutland wrote: > On Mon, Aug 05, 2013 at 10:17:37PM +0100, Vince Weaver wrote: > > It looks like in validate_event() we do > > > > struct arm_pmu *armpmu = to_arm_pmu(event->pmu); > > ... > > return armpmu->get_event_idx(hw_eve

Re: perf,arm -- oops in validate_event

2013-08-06 Thread Mark Rutland
Hi Vince, Thanks for the report. On Mon, Aug 05, 2013 at 10:17:37PM +0100, Vince Weaver wrote: > On Mon, 5 Aug 2013, Vince Weaver wrote: > > > My perf_fuzzer quickly triggers this oops on my ARM Cortex A9 pandaboard > > running Linux 3.11-rc4. > > > > Below is the oops, I've attached a simple C

Re: perf,arm -- oops in validate_event

2013-08-05 Thread Vince Weaver
On Mon, 5 Aug 2013, Vince Weaver wrote: > My perf_fuzzer quickly triggers this oops on my ARM Cortex A9 pandaboard > running Linux 3.11-rc4. > > Below is the oops, I've attached a simple C test case that triggers the > bug. Also, if it helps, the disassembled code in question. It looks like in