Re: About perf,arm -- oops in validate_event

2013-08-20 Thread Catalin Marinas
On Tue, Aug 20, 2013 at 03:42:56PM +0100, Vince Weaver wrote: > On Tue, 20 Aug 2013, Catalin Marinas wrote: > > > On 20 August 2013 11:03, P J P wrote: > > > -> https://lkml.org/lkml/2013/8/7/259 > > > > > > I wanted to confirm if this above fix should also go into ARM64 build Or > > > is > >

Re: About perf,arm -- oops in validate_event

2013-08-20 Thread Vince Weaver
On Tue, 20 Aug 2013, Catalin Marinas wrote: > On 20 August 2013 11:03, P J P wrote: > > -> https://lkml.org/lkml/2013/8/7/259 > > > > I wanted to confirm if this above fix should also go into ARM64 build Or is > > ARM64 platform not vulnerable? > > It is and I'll push patches to mainline (Will

Re: About perf,arm -- oops in validate_event

2013-08-20 Thread Catalin Marinas
On 20 August 2013 11:03, P J P wrote: > -> https://lkml.org/lkml/2013/8/7/259 > > I wanted to confirm if this above fix should also go into ARM64 build Or is > ARM64 platform not vulnerable? It is and I'll push patches to mainline (Will is preparing them). Catalin -- To unsubscribe from this

About perf,arm -- oops in validate_event

2013-08-20 Thread P J P
Hello, -> https://lkml.org/lkml/2013/8/7/259 I wanted to confirm if this above fix should also go into ARM64 build Or is ARM64 platform not vulnerable? === $ git diff diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 9ba33c4..cbed82f 100644 ---

About perf,arm -- oops in validate_event

2013-08-20 Thread P J P
Hello, - https://lkml.org/lkml/2013/8/7/259 I wanted to confirm if this above fix should also go into ARM64 build Or is ARM64 platform not vulnerable? === $ git diff diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 9ba33c4..cbed82f 100644 ---

Re: About perf,arm -- oops in validate_event

2013-08-20 Thread Catalin Marinas
On 20 August 2013 11:03, P J P ppan...@redhat.com wrote: - https://lkml.org/lkml/2013/8/7/259 I wanted to confirm if this above fix should also go into ARM64 build Or is ARM64 platform not vulnerable? It is and I'll push patches to mainline (Will is preparing them). Catalin -- To

Re: About perf,arm -- oops in validate_event

2013-08-20 Thread Vince Weaver
On Tue, 20 Aug 2013, Catalin Marinas wrote: On 20 August 2013 11:03, P J P ppan...@redhat.com wrote: - https://lkml.org/lkml/2013/8/7/259 I wanted to confirm if this above fix should also go into ARM64 build Or is ARM64 platform not vulnerable? It is and I'll push patches to mainline

Re: About perf,arm -- oops in validate_event

2013-08-20 Thread Catalin Marinas
On Tue, Aug 20, 2013 at 03:42:56PM +0100, Vince Weaver wrote: On Tue, 20 Aug 2013, Catalin Marinas wrote: On 20 August 2013 11:03, P J P ppan...@redhat.com wrote: - https://lkml.org/lkml/2013/8/7/259 I wanted to confirm if this above fix should also go into ARM64 build Or is

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 > > > ---

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

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

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

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

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

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 more

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 nearer

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 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 sure that

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 issue (can

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_event.c +++

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 =

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

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

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 test

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_events, event)

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-pmu);

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

perf,arm -- oops in validate_event

2013-08-05 Thread Vince Weaver
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. Vince [ 8110.698669] Unable to handle kernel paging request at virtual address fffe [ 8110.706390] pgd = ecd88000

perf,arm -- oops in validate_event

2013-08-05 Thread Vince Weaver
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. Vince [ 8110.698669] Unable to handle kernel paging request at virtual address fffe [ 8110.706390] pgd = ecd88000

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