This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about kprobes implementation on SMP and preemptible kernels


On Tue, Jan 30, 2007 at 11:43:45PM -0600, Quentin Barnes wrote:
> On Mon, Jan 29, 2007 at 09:57:55AM +0530, Ananth N Mavinakayanahalli wrote:
> >On Sat, Jan 27, 2007 at 05:59:48PM -0600, Quentin Barnes wrote:
> >>On Tue, Jan 16, 2007 at 11:09:55AM +0530, Ananth N Mavinakayanahalli 
> >>wrote:

...

> >>Which architectures allow interrupts while handling a kprobe?
> >
> >Powerpc and AFAIR x86_64 and IA64 run with interrupts enabled
> >throughout.
> 
> I looked at PowerPC in 2.6.20-rc4.  The function
> program_check_exception() is calling notify_die() for a breakpoint
> exeception before it is calling local_irq_enable().  I don't
> see anywhere in the powerpc arch kprobes code interrupts being
> re-enabled.  But I don't know the PowerPC code all that well.  Can
> you point me me to where interrupts are getting re-enabled while a
> kprobe is being processed?  I haven't written any PowerPC assembly
> in over a decade, so I shied away from trying to parse head_8xx.S.

:-)

Please see program_check_common in head_64.S:

        .globl program_check_common
program_check_common:
        EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
        bl      .save_nvgprs
        addi    r3,r1,STACK_FRAME_OVERHEAD
        ENABLE_INTS		<-- turns on the MSR_EE bit
        bl      .program_check_exception <-- kprobe handling happens here
        b       .ret_from_except

Ananth


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]