mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: "Luming Yu" <luming.yu@gmail.com>
Cc: "Petr Tesarik" <ptesarik@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-ia64@vger.kernel.org
Subject: Re: [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race
Date: Tue,  9 Sep 2008 22:55:04 -0700 (PDT)	[thread overview]
Message-ID: <20080910055504.9A2A41541FE@magilla.localdomain> (raw)
In-Reply-To: Luming Yu's message of  Tuesday, 9 September 2008 11:06:27 +0800 <3877989d0809082006v496bae4i1c0736f5d55e9b9f@mail.gmail.com>

This subject line is quite far from what you're now addressing, btw.

I certainly wouldn't recommend that patch.  The interference between ptrace
uses of SIGTRAP and a program that blocks SIGTRAP is just a fact of life
with ptrace.  If you wanted to change the exec SIGTRAP to be more
consistent with other signals induced by debuggers (such as breakpoints and
single-step), you could just change send_sig to force_sig.  That unblocks
SIGTRAP and resets its handler when it's blocked.  Conversely, a tracer
program could use PTRACE_O_TRACEEXEC if it cared to deal with tracing a
process that blocks SIGTRAP.  (That uses ptrace_notify rather than any
actual signal that can be blocked.)

But, none of this goes to your actual problem at all AFAICT.  You've said
your actual problem with strace only arises on ia64.  The behavior of
ptrace'd exec, and the effect of a program blocking SIGTRAP, is exactly the
same across all machines.  Changing it does not explain your situation.
I'm in favor of understanding what is actually going on before changing
things.

If the SIGTRAP from exec is actually seen by strace on a different machine
like it's not on ia64, that suggests that something different happened
between the two.  In the case that doesn't exhibit the problem, either
SIGTRAP got unblocked by something before the exec, or userland (strace)
behaves differently so that it doesn't care about not seeing that SIGTRAP.


Thanks,
Roland

  reply	other threads:[~2008-09-10  5:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22  2:47 Luming Yu
2008-05-22  8:47 ` Petr Tesarik
2008-05-22  9:16   ` Luming Yu
2008-05-22 11:18     ` Roland McGrath
2008-05-22 12:12       ` Petr Tesarik
2008-05-22 20:39         ` Roland McGrath
2008-05-23 12:33         ` Luming Yu
2008-05-22 13:24       ` Luming Yu
2008-05-22 20:34         ` Roland McGrath
2008-05-23  3:42           ` Luming Yu
2008-05-23  4:19             ` Roland McGrath
2008-05-23  5:24               ` Luming Yu
2008-05-26  0:15                 ` Roland McGrath
2008-05-26  1:30                   ` Luming Yu
2008-05-27  3:31                     ` Luming Yu
2008-05-27  4:04                       ` Roland McGrath
2008-05-27  5:49                         ` Luming Yu
2008-05-27  6:12                           ` Roland McGrath
2008-05-27  6:25                             ` Petr Tesarik
2008-06-03  6:04                               ` Luming Yu
2008-06-03  9:01                                 ` Petr Tesarik
2008-06-03 14:32                                   ` Petr Tesarik
2008-06-03 21:01                                     ` Roland McGrath
2008-06-03 21:31                                       ` Luck, Tony
2008-06-03 22:13                                         ` Roland McGrath
2008-06-10  8:23                                         ` Luming Yu
2008-06-04  2:16                                     ` Luming Yu
2008-06-04  9:16                                       ` Petr Tesarik
2008-06-05  1:49                                         ` Luming Yu
2008-06-05 11:16                                           ` Petr Tesarik
2008-06-06  0:07                                             ` Roland McGrath
2008-09-09  3:06                                               ` Luming Yu
2008-09-10  5:55                                                 ` Roland McGrath [this message]
2008-09-16  8:50                                                   ` Luming Yu
2008-09-17 17:01                                                     ` Roland McGrath
2008-09-18  5:44                                                       ` Luming Yu
2008-05-27  6:34                             ` Luming Yu
2008-05-27  8:48                             ` Luming Yu
2008-05-28  9:14                               ` Luming Yu
2008-06-03  6:02                                 ` Luming Yu
2008-05-30  8:05                               ` 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=20080910055504.9A2A41541FE@magilla.localdomain \
    --to=roland@redhat.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luming.yu@gmail.com \
    --cc=ptesarik@suse.cz \
    /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®