mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	mingo@redhat.com, cagney@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] x86 single-step (TF) vs system calls & traps
Date: Mon, 28 Jun 2004 21:37:34 -0700	[thread overview]
Message-ID: <200406290437.i5T4bYPI022901@magilla.sf.frob.com> (raw)
In-Reply-To: Andrew Morton's message of  Monday, 28 June 2004 21:15:59 -0700 <20040628211559.73ded525.akpm@osdl.org>

> Davide's patch (which has been in -mm for 6-7 weeks) doesn't add
> fastpath overhead.

I am also dubious about exactly what it does.  That patch seems a bizarre
obfuscation of the code to me.  TIF_SINGLESTEP is really there to handle
the lazy TF clearing for sysenter entry, and that's all.  I don't think
that patch handles user-mode setting TF properly, unusual though that case
is.  How does that patch interact with PT_TRACESYSGOOD?  It appears to me
that PTRACE_SINGLESTEP will now generate a syscall trap instead of a
single-step trap, which is an undesireable change in behavior I would say.

I don't really care about user-mode setting of TF before executing int
$0x80.  If poeple have programs that use TF in user mode, they have never
complained about the issue before.  For PTRACE_SINGLESTEP, Davide's
approach of setting the kernel-work flag directly when PTRACE_SINGLESTEP
sets TF in the user flags word is the obvious way to avoid the test in the
fast path.  I am inclined to combine that approeach with what my patch
does, i.e. just take out the system call fast-path test and set
TIF_SINGLESTEP_TRAP in PTRACE_SINGLESTEP.  I think the way Davide's patch
uses TIF_SINGLESTEP is pretty questionable.


Thanks,
Roland


  reply	other threads:[~2004-06-29  4:37 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 [this message]
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
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=200406290437.i5T4bYPI022901@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=cagney@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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®