Re: [PATCH] uprobes: don't enable/disable signle step if the userdid it

From: Ananth N Mavinakayanahalli
Date: Mon Jul 30 2012 - 07:07:36 EST


On Thu, Jul 26, 2012 at 05:20:43PM +0200, Sebastian Andrzej Siewior wrote:
> If someone is using single stepping over uprobe brackpoint then after
> we pass the uprobe single step, single stepping is disabled and the user
> who enebaled them in the first place does not know anything about this.
>
> This patch avoids enabling / disabling the single step mode if it is
> already enabled.

This could happen any time 2 different entities call the
user_(en/dis)able_single_step() helpers on the same thread.

Wouldn't the right way to fix it be to teach these helpers
to honor what the TIF_SINGLESTEP flag setting was in the first place?
This way you'd get rid of the portability concerns too, since these
helpers are available on most architectures.

Ananth

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