mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	mingo@redhat.com, cagney@redhat.com,
	Daniel Jacobowitz <drow@false.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86 single-step (TF) vs system calls & traps
Date: Thu, 1 Jul 2004 14:47:45 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0407011435420.20246@bigblue.dev.mdolabs.com> (raw)
In-Reply-To: <200407012024.i61KOp3J021841@magilla.sf.frob.com>

On Thu, 1 Jul 2004, Roland McGrath wrote:

> > Here I meant that if you set SINGLESTEP|SYSGOOD, the patch will give you 
> > SIGTRAP|0x80, while if you set only SINGLESTEP the patch will give you 
> > SIGTRAP. Enforcing the SINGLESTEP|SYSGOOD is invalid or only gives SIGTRAP 
> > should be no more that three lines of code out of the fast path.
> 
> There is no "set SINGLESTEP|SYSGOOD".  PTRACE_SINGLESTEP is a one-time
> operation.  PTRACE_O_TRACESYSGOOD is a persistent flag you set when you
> intend to at some point use the PTRACE_SYSCALL operation.

Allrighty ...

Andrew, per Roland suggestion, can you please add the patch below to the 
bits you already have in -mm?


Signed-off-by: Davide Libenzi <davidel@xmailserver.org>



- Davide



--- a/arch/i386/kernel/ptrace.c	2004-07-01 14:30:38.000000000 -0700
+++ b/arch/i386/kernel/ptrace.c	2004-07-01 14:32:44.000000000 -0700
@@ -546,8 +546,8 @@
 		return;
 	/* the 0x80 provides a way for the tracing parent to distinguish
 	   between a syscall stop and SIGTRAP delivery */
-	ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
-				 ? 0x80 : 0));
+	ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
+				 !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
 
 	/*
 	 * this isn't the same as continuing with a signal, but it will do

  reply	other threads:[~2004-07-01 21:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-29  1:55 Roland McGrath
2004-06-29  2:05 ` Davide Libenzi
2004-06-29  3:42 ` Linus Torvalds
2004-06-29  3:46   ` Roland McGrath
2004-06-29  3:55     ` Linus Torvalds
2004-06-29  4:15       ` Andrew Morton
2004-06-29  4:37         ` Roland McGrath
2004-06-29  7:00           ` Davide Libenzi
2004-07-01  7:47             ` Roland McGrath
2004-07-01 15:14               ` Davide Libenzi
2004-07-01 20:24                 ` Roland McGrath
2004-07-01 21:47                   ` Davide Libenzi [this message]
2004-07-01 20:34               ` Daniel Jacobowitz
2004-07-01 21:59                 ` Roland McGrath
2004-07-02  4:22                   ` Daniel Jacobowitz
2004-06-29  4:32       ` Roland McGrath
2004-06-29  5:15         ` Linus Torvalds
2004-07-01  8:09           ` Roland McGrath

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=Pine.LNX.4.58.0407011435420.20246@bigblue.dev.mdolabs.com \
    --to=davidel@xmailserver.org \
    --cc=akpm@osdl.org \
    --cc=cagney@redhat.com \
    --cc=drow@false.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roland@redhat.com \
    --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®