Re: [patch] i386: fix singlestepping though a syscall

From: Linus Torvalds
Date: Thu Feb 16 2006 - 20:13:35 EST




On Thu, 16 Feb 2006, Chuck Ebbert wrote:
>
> Singlestep through a syscall using vsyscall-sysenter had two bugs:
>
> 1. Setting TIF_SINGLESTEP is not enough to force
> do_notify_resume() to be run on return to user;
> TIF_IRET must also be set.

Interesting, but I think you pinpointed the _real_ bug.

TIF_SINGLESTEP very much should be enough to force do_notify_resume() to
be run on return to user space.

Sounds like somebody is testing _TIF_WORK_MASK rather than
_TIF_ALLWORK_MASK.

I'd suspect the "work_pending" case. Looks like we miss testing the TIF
flags there.

Oh, actually, I think you should just remove the clearing of
_TIF_SINGLESTEP from _TIF_WORK_MASK. Does that fix the bug.

Linus
-
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/