From: Chuck Ebbert <76306.1226@compuserve.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: i386 singlestep is borken
Date: Thu, 16 Feb 2006 05:58:15 -0500 [thread overview]
Message-ID: <200602160601_MC3-1-B882-BFB6@compuserve.com> (raw)
Playing around with singlestep on i386, I found this:
1. User sets TF and starts to singlestep through code,
handling SIGTRAPS as they occur.
2. Makes vsyscall; debug trap occurs in kernel mode and TF
is cleared. TIF_SINGLESTEP gets set so kernel will remember
to re-enable TF on return to user. But when user eflags
is saved on the stack, TF has already been cleared.
3. When user gets control back, TF is not re-enabled.
4. Even after user clears TF, TIF_SINGLESTEP remains set
for that thread.
None of this happens when using int80 because the flag
is cleared and re-enabled by the interrupt handler.
TIF_SINGLESTEP never gets set and doesn't need to be.
--
Chuck
"Equations are the Devil's sentences." --Stephen Colbert
next reply other threads:[~2006-02-16 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-16 10:58 Chuck Ebbert [this message]
2006-02-16 16:28 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200602160601_MC3-1-B882-BFB6@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®