lkml.org 
[lkml]   [2006]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kprobes for s390 architecture
> ok, I tried, but my "better ideas" made things worse. stop_machine_run() wins:
>
> void __kprobes arch_arm_kprobe(struct kprobe *p)
> {
> struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
> unsigned long status = kcb->kprobe_status;
> struct ins_replace_args args;
>
> args.ptr = p->addr;
> args.old = p->opcode;
> args.new = BREAKPOINT_INSTRUCTION;
>
> kcb->kprobe_status = KPROBE_SWAP_INST;
> stop_machine_run(swap_instruction, &args, NR_CPUS);
> kcb->kprobe_status = status;
> }
>
> It works, and I guess at this point is the only way to do it. I'll send out a
> full patch with this and the other cleanups later.

How fast is this if you have to exchange several hundred instructions?
-
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-07-07 19:31    [W:0.824 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site