[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110727163159.GA23785@redhat.com>
Date: Wed, 27 Jul 2011 18:31:59 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Roland McGrath <roland@...k.frob.com>,
Tejun Heo <tj@...nel.org>
Cc: Denys Vlasenko <dvlasenk@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Matt Fleming <matt.fleming@...ux.intel.com>,
linux-kernel@...r.kernel.org
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(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists