mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [patch] i386: another possible singlestep fix
Date: Fri, 17 Feb 2006 16:49:57 -0500	[thread overview]
Message-ID: <200602171652_MC3-1-B8AC-373E@compuserve.com> (raw)

When entering kernel via int80, TIF_SINGLESTEP is not set
when TF has been set in eflags by the user.  This patch
does that.

To make things symmetrical, something further should be done.
Either (a) add to this patch so it clears TF after setting
TIF_SINGLESTEP, or (b) change the sysenter path so it sets
TF in regs.eflags when it finds TIF_SINGLESTEP was set by
do_debug() during kernel entry.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>

--- 2.6.16-rc3.orig/arch/i386/kernel/entry.S
+++ 2.6.16-rc3/arch/i386/kernel/entry.S
@@ -226,6 +226,10 @@ ENTRY(system_call)
 	pushl %eax			# save orig_eax
 	SAVE_ALL
 	GET_THREAD_INFO(%ebp)
+	testl $TF_MASK,EFLAGS(%esp)
+	jz no_singlestep
+	orl $_TIF_SINGLESTEP,TI_flags(%ebp)
+no_singlestep:
 					# system call tracing in operation / emulation
 	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
 	testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
-- 
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert

             reply	other threads:[~2006-02-17 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 21:49 Chuck Ebbert [this message]
2006-02-17 22:14 ` Linus Torvalds
2006-02-18  5:29 Chuck Ebbert
2006-02-21 23:03 Chuck Ebbert

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=200602171652_MC3-1-B8AC-373E@compuserve.com \
    --to=76306.1226@compuserve.com \
    --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®