lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kprobes for s390 architecture
    On Wed, Jun 21, 2006 at 06:38:40PM +0200, Martin Schwidefsky wrote:
    > You misunderstood me here. I'm not talking about storing the same piece
    > of data to memory on each processor. I'm talking about isolating all
    > other cpus so that the initiating cpu can store the breakpoint to memory
    > without running into the danger that another cpu is trying to execute it
    > at the same time. But probably the store should be atomic in regard to
    > instruction fetching on the other cpus. It is only two bytes and it
    > should be aligned.

    So maybe something like this:

    void smp_replace_instruction(void *info) {
    struct ins_replace_args *parms;
    parms = (struct ins_replace_args *) info;
    *parms->addr = *parms->insn
    }

    void __kprobes arch_arm_kprobe(struct kprobe *p)
    {
    struct ins_replace_args parms;
    parms.addr = p->addr;
    parms.insn = BREAKPOINT_INSTRUCTION

    preempt_disable();
    smp_call_function(smp_replace_instruction, &parms, 0, 1);
    preempt_enable();
    }

    Thanks
    Mike
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-06-21 19:37    [W:0.026 / U:125.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site