[PATCH v14 7/7] ARM: kprobes: enable OPTPROBES for ARM 32
flat view
From: Wang Nan <hidden>
Date: 2014-12-08 13:48:23
Also in:
lkml
On 2014/12/8 21:22, Jon Medhurst (Tixy) wrote:
On Mon, 2014-12-08 at 20:31 +0800, Wang Nan wrote:quoted
On 2014/12/8 20:06, Wang Nan wrote:quoted
On 2014/12/8 19:50, Jon Medhurst (Tixy) wrote:quoted
On Mon, 2014-12-08 at 19:15 +0800, Wang Nan wrote:quoted
On 2014/12/8 19:04, Jon Medhurst (Tixy) wrote:quoted
On Mon, 2014-12-08 at 14:28 +0800, Wang Nan wrote:[...]quoted
quoted
so another CPU could find and delete next before this one has finished doing so. Would the list end up in a consistent state where no loops develop and no probes are missed? I don't know the answer and a full analysis would be complicated, but my gut feeling is that if a cpu can observe the links in the list in an inconsistent state then only bad things can result.I see the problem. I'm thinking about making core.c and opt-arm.c to share stop_machine() code. stop_machine() is required when removing breakpoint, so I'd like to define a "remove_breakpoint" function in core.c and make opt-arm.c to call it. Do you think it is a good idea?What I mean is something like this:Yes, that should work, though as remove_breakpoint is a globally visible symbol, I suggest a less generic name for it, perhaps remove_kprobe_breakpoint ?
I don't think it is globally visible. Only files in arm/probes/kprobes can include "core.h". However, I do agree that remove_breakpoint() is not a good name. In my v15 patch, I'd like to rename it to kprobe_remove_breakpoint(), due to may of names defined in core.h are called kprobes_xxx. Thank you!