Re: kgdb segv in the latest tip due to perf ctx changes

From: Jason Wessel
Date: Fri Sep 24 2010 - 16:31:31 EST


This is a multi-part message in MIME format.Jiri,

Can you try this simple patch which is attached?



On 09/24/2010 01:04 PM, Jiri Olsa wrote:
> while starting kgdb early debug on latest tip tree,
> I got SIGSEGV inside kernel in following location:
>
>
[clip]
> I found out it's due to foolowing commit, that's causing the init code
> to be called without the ctx field being defined...
>
> commit c3f00c70276d8ae82578c8b773e2db657f69a478
> Author: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Date: Wed Aug 18 14:37:15 2010 +0200
>
>
>

I took a look at the tip core, and the ctx parameter is no longer passed
into the perf_event_alloc() from perf_event_create_kernel_counter() kgdb
no longer gets it filled in for free.

The reality is that kgdb never had a true context or a way to mark the
hw breakpoint as a kernel only context for the hw breakpoint
reservations. The patch is only a short term fix perhaps until on of
the perf guys explains the right way to use it. :-)

Thanks,
Jason.