lkml.org 
[lkml]   [2012]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uprobes: don't enable/disable signle step if the user did it
On 07/26/2012 05:20 PM, Sebastian Andrzej Siewior wrote:
> diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
> index f935327..772eb3a 100644
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -1528,7 +1528,10 @@ static void handle_swbp(struct pt_regs *regs)
>
> utask->state = UTASK_SSTEP;
> if (!pre_ssout(uprobe, regs, bp_vaddr)) {
> - user_enable_single_step(current);
> + if (test_tsk_thread_flag(current, TIF_SINGLESTEP))
> + uprobe->flags |= UPROBE_USER_SSTEP;
> + else
> + user_enable_single_step(current);

After looking at it for a bit I noticed that the state should be saved
in utask intead of uprobe because uprobe might be shared with another
task.
I would resend the fixed patch unless someone comes up with something
else..

Sebastian


\
 
 \ /
  Last update: 2012-07-26 20:21    [W:0.103 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site