lkml.org 
[lkml]   [2011]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH 0/8] make vfork killable/restartable/traceable
Hello.

CLONE_VFORK sleeps in TASK_INTERRUPTIBLE until the child exits/execs.
This is obviously not good, it is sooo simple to create the task which
doesn't react to SIGKILL/SIGSTOP.

Questions:

- do we really need this?

I think we do. This really "looks like a bug" in any case,
even if nobody ever complained afaik.

- may be 1-3 is enough?

may be... but personally I think SIGSTOP/ptrace should work
too.

- is it safe to exit/stop on !x86 machine???

I do not know. May be this needs some #ifdef's around
wait_for_completion_interruptible(). I am not sure that,
say, arch_ptrace_stop() can't abuse the ->mm shared with
the child.

OTOH. This can happen anyway, do_fork() does ptrace_event()
before wait_for_completion().

- and of course, while I think this is bugfix, this is user
visible change.

Please comment.

9/8 is off-topic.

Oleg.

fs/exec.c | 11 ----
include/linux/sched.h | 2 +-
include/linux/thread_info.h | 4 ++
kernel/fork.c | 121 ++++++++++++++++++++++++++++++++++---------
kernel/pid.c | 13 +++++
5 files changed, 114 insertions(+), 37 deletions(-)



\
 
 \ /
  Last update: 2011-07-27 18:37    [W:0.225 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site