lkml.org 
[lkml]   [2009]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ptrace: ptrace_attach: check PF_KTHREAD + exit_state instead of ->mm
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?


\
 
 \ /
  Last update: 2009-05-06 01:55    [W:0.113 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site