public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: chrisw@sous-sol.org, roland@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] ptrace: ptrace_attach: check PF_KTHREAD + exit_state instead of ->mm
Date: Tue, 5 May 2009 18:24:44 -0700	[thread overview]
Message-ID: <20090505182444.de4e0143.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090505235736.GA7526@redhat.com>

On Wed, 6 May 2009 01:57:36 +0200 Oleg Nesterov <oleg@redhat.com> wrote:

> On 05/05, Andrew Morton wrote:
> >
> > On Wed, 6 May 2009 00:47:22 +0200
> > Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > > - Add PF_KTHREAD check to prevent attaching to the kernel thread
> > >   with a borrowed ->mm.
> > >
> > >   With or without this change we can race with daemonize() which
> > >   can set PF_KTHREAD or clear ->mm after ptrace_attach() does the
> > >   check, but this doesn't matter because reparent_to_kthreadd()
> > >   does ptrace_unlink().
> > >
> > > - Kill "!task->mm" check. We don't really care about ->mm != NULL,
> > >   and the task can call exit_mm() right after we drop task_lock().
> > >   What we need is to make sure we can't attach after exit_notify(),
> > >   check task->exit_state != 0 instead.
> > >
> >
> > These patches make a mess of utrace-core.patch.  Do we really want to do that?
> 
> Aaaah. Sorry! forgot to clearify...
> 
> These patches depend on
> 
> 	utrace-core-kill-exclude_xtrace-logic.patch
> 
> which hopefully can be folded into utrace-core.patch. In that case these
> changes do not depend on utrace, and they can go ahead of utrace.
> 

oic.  Strange that the patches applied, but utrace didn't apply on them.

I now have:

#
# ptrace
#
ptrace-remove-pt_dtrace-from-arch-h8300.patch
ptrace-remove-pt_dtrace-from-avr32-mn10300-parisc-s390-sh-xtensa.patch
ptrace-remove-pt_dtrace-from-m68k-m68knommu.patch
ptrace-remove-pt_dtrace-from-arch-m32r.patch
ptrace-mm_need_new_owner-use-real_parent-to-search-in-the-siblings.patch
ptrace-tracehook_unsafe_exec-remove-the-stale-comment.patch
ptrace-tracehook_unsafe_exec-remove-the-stale-comment-fix.patch
ptrace-do-not-use-task-ptrace-directly-in-core-kernel.patch
#
# utrace
#
signals-tracehook_notify_jctl-change.patch
utrace-core.patch
utrace-core-kill-exclude_xtrace-logic.patch
#
ptrace-ptrace_attach-check-pf_kthread-exit_state-instead-of-mm.patch
ptrace-cleanup-check-set-of-pt_ptraced-during-attach.patch
ptrace-do-not-use-task_lock-for-attach.patch
ptrace_get_task_struct-s-tasklist-rcu-make-it-static.patch


  reply	other threads:[~2009-05-06  1:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 22:47 [PATCH 1/3] ptrace: ptrace_attach: check PF_KTHREAD + exit_state instead of ->mm Oleg Nesterov
2009-05-05 23:47 ` Andrew Morton
2009-05-05 23:57   ` Oleg Nesterov
2009-05-06  1:24     ` Andrew Morton [this message]
2009-05-06  2:06       ` Roland McGrath
2009-05-06  4:56         ` Oleg Nesterov
2009-05-06  5:03           ` Andrew Morton
2009-05-06  7:08   ` Christoph Hellwig
2009-05-06  7:41     ` Ingo Molnar
2009-05-06  2:02 ` Roland McGrath
2009-05-06  4:52   ` Oleg Nesterov
2009-05-07  5:51     ` Roland McGrath
2009-05-09 18:43       ` Oleg Nesterov
2009-05-10 23:11         ` 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=20090505182444.de4e0143.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.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