linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
	linux-kernel@vger.kernel.org,
	Denys Vlasenko <vda.linux@googlemail.com>
Subject: Re: [PATCH v3] Make PTRACE_SEIZE set ptrace options specified in 'data'
Date: Sun, 11 Sep 2011 08:34:31 +0900	[thread overview]
Message-ID: <20110910233431.GD29319@htj.dyndns.org> (raw)
In-Reply-To: <1315506333.18043.49.camel@dhcp-25-63.brq.redhat.com>

On Thu, Sep 08, 2011 at 08:22:04PM +0200, Denys Vlasenko wrote:
> Make PTRACE_SEIZE set ptrace options specified in 'data' parameter
>     
> This can be used to close a few corner cases in strace where we get
> unwanted racy behavior after attach, but before we have a chance
> to set options (the notorious post-execve SIGTRAP comes to mind),
> and removes the need to track "did we set opts for this task" state
> in strace internals.
>     
> While we are at it:
>     
> Make it possible to extend SEIZE in the future with more functionality
> by passing non-zero 'addr' parameter.
> To that end, error out if 'addr' is non-zero.
> PTRACE_ATTACH did not (and still does not) have such check,
> and users (strace) do pass garbage there... let's avoid repeating
> this mistake with SEIZE.
>     
> Set all task->ptrace bits in one operation - before this change,
> we were adding PT_SEIZED and PT_PTRACE_CAP with task->ptrace |= BIT ops.
> This was probably ok (not a bug), but let's be on a safer side.
> 
> Changes since v2: use (unsigned long) casts instead of (long) ones,
> move PTRACE_SEIZE_DEVEL-related code to separate lines of code.
> 
>     
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

      parent reply	other threads:[~2011-09-10 23:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 18:22 [PATCH v3] Make PTRACE_SEIZE set ptrace options specified in 'data' Denys Vlasenko
2011-09-08 19:24 ` Oleg Nesterov
2011-09-09 11:12 ` Pedro Alves
2011-09-09 12:28   ` Denys Vlasenko
2011-09-09 13:15     ` Pedro Alves
2011-09-09 16:30       ` Oleg Nesterov
2011-09-09 16:55       ` Denys Vlasenko
2011-09-09 17:09         ` Pedro Alves
2011-09-09 17:18           ` Oleg Nesterov
2011-09-09 20:03           ` Denys Vlasenko
2011-09-10 11:19             ` Pedro Alves
2011-09-10 11:40               ` Denys Vlasenko
2011-09-10 12:12                 ` Pedro Alves
2011-09-10 15:36                   ` Pedro Alves
2011-09-13  7:45                     ` Indan Zupancic
2011-09-13  8:04                   ` Indan Zupancic
2011-09-10 23:34 ` Tejun Heo [this message]

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=20110910233431.GD29319@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=dvlasenk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).