From: Tejun Heo <tj@kernel.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
vda.linux@googlemail.com, jan.kratochvil@redhat.com,
pedro@codesourcery.com, indan@nul.nu, bdonlan@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ptrace: fix ptrace_signal() && STOP_DEQUEUED interaction
Date: Wed, 13 Jul 2011 12:04:04 +0200 [thread overview]
Message-ID: <20110713100404.GG2872@htj.dyndns.org> (raw)
In-Reply-To: <20110707190324.GB25332@redhat.com>
Hello, Oleg. Sorry about the long delay. Was lost somewhere else. :)
On Thu, Jul 07, 2011 at 09:03:24PM +0200, Oleg Nesterov wrote:
> Without the patch it hangs. After the patch SIGSTOP "injected" by the
> tracer is not ignored and stops the tracee.
I always felt the ability to 'inject' different signal there is rather
useless and prone to induce weird issues. It would be better if
ptrace_signal() is part of signal delivery action after all the checks
so that the ptracer says whether to proceed with the action or not but
no more. Well...
> So lets add STOP_DEQUEUED _before_ we report the signal. It has no effect
> unless sig_kernel_stop() == T after the tracer resumes us, and in the
> latter case the pending STOP_DEQUEUED means no SIGCONT in between, we
> should stop.
Anyways, yes, this seems to be a nice improvement but it looks very
weird (and difficult to comprehend) to be setting STOP_DEQUEUED
unconditionally in ptrace_signal(). Wouldn't it be better to flip the
flag so that we have CONT_RECEIVED before doing this?
Thanks.
--
tejun
next prev parent reply other threads:[~2011-07-13 10:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 19:03 [PATCH 0/1] " Oleg Nesterov
2011-07-07 19:03 ` [PATCH 1/1] " Oleg Nesterov
2011-07-13 10:04 ` Tejun Heo [this message]
2011-07-13 18:33 ` Oleg Nesterov
2011-07-14 6:45 ` Tejun Heo
2011-07-14 19:12 ` Oleg Nesterov
2011-07-17 19:03 ` Oleg Nesterov
2011-07-20 16:44 ` Tejun Heo
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=20110713100404.GG2872@htj.dyndns.org \
--to=tj@kernel.org \
--cc=bdonlan@gmail.com \
--cc=indan@nul.nu \
--cc=jan.kratochvil@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pedro@codesourcery.com \
--cc=torvalds@linux-foundation.org \
--cc=vda.linux@googlemail.com \
/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
Powered by JetHome