All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] make vfork killable/restartable/traceable
@ 2011-07-27 16:31 Oleg Nesterov
  2011-07-27 16:32 ` [PATCH 1/8] vfork: introduce complete_vfork_done() Oleg Nesterov
                   ` (13 more replies)
  0 siblings, 14 replies; 54+ messages in thread
From: Oleg Nesterov @ 2011-07-27 16:31 UTC (permalink / raw)
  To: Linus Torvalds, Roland McGrath, Tejun Heo
  Cc: Denys Vlasenko, KOSAKI Motohiro, Matt Fleming, linux-kernel

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(-)


^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2011-08-30 22:06 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 16:31 [PATCH 0/8] make vfork killable/restartable/traceable Oleg Nesterov
2011-07-27 16:32 ` [PATCH 1/8] vfork: introduce complete_vfork_done() Oleg Nesterov
2011-07-27 16:32 ` [PATCH 2/8] vfork: introduce clone_vfork_finish() Oleg Nesterov
2011-07-27 16:32 ` [PATCH 3/8] vfork: make it killable Oleg Nesterov
2011-07-29 13:02   ` Matt Fleming
2011-07-29 14:32     ` Oleg Nesterov
2011-07-29 15:32       ` Matt Fleming
2011-07-27 16:33 ` [PATCH 4/8] coredump_wait: don't call complete_vfork_done() Oleg Nesterov
2011-07-29 13:02   ` Matt Fleming
2011-07-29 14:25     ` Oleg Nesterov
2011-07-29 15:26       ` Matt Fleming
2011-07-27 16:33 ` [PATCH 5/8] introduce find_get_task_by_vpid() Oleg Nesterov
2011-07-27 16:33 ` [PATCH 6/8] vfork: do not setup child->vfork_done beforehand Oleg Nesterov
2011-07-27 16:34 ` [PATCH 7/8] vfork: make it stoppable/traceable Oleg Nesterov
2011-07-27 16:34 ` [PATCH 8/8] vfork: do not block SIG_DFL/SIG_IGN signals is single-threaded Oleg Nesterov
2011-07-27 16:34 ` [PATCH 9/8] kill PF_STARTING Oleg Nesterov
2011-07-27 19:39 ` [PATCH 0/8] make vfork killable/restartable/traceable Linus Torvalds
2011-07-28 13:59   ` Oleg Nesterov
2011-07-28 14:58     ` Oleg Nesterov
2011-07-27 22:38 ` Pedro Alves
2011-07-29 19:23 ` Tejun Heo
2011-08-12 17:55   ` [PATCH v2 0/3] make vfork killable Oleg Nesterov
2011-08-12 17:56     ` [PATCH 1/3] vfork: introduce complete_vfork_done() Oleg Nesterov
2011-08-12 17:56     ` [PATCH 2/3] vfork: make it killable Oleg Nesterov
2011-08-19 20:33       ` Matt Fleming
2011-08-22 13:35         ` Oleg Nesterov
2011-08-12 17:56     ` [PATCH 3/3] coredump_wait: don't call complete_vfork_done() Oleg Nesterov
2011-08-17  7:50       ` Tejun Heo
2011-08-17 15:11         ` Oleg Nesterov
2011-08-12 17:57     ` [PATCH 4/3] kill PF_STARTING Oleg Nesterov
2011-08-17  7:51       ` Tejun Heo
2011-08-13 16:18     ` [PATCH v2 0/3] make vfork killable Tejun Heo
2011-08-15 19:42       ` Oleg Nesterov
2011-08-16 19:42         ` Tejun Heo
2011-08-23 22:01       ` Matt Helsley
2011-08-23 22:12         ` Tejun Heo
     [not found] ` <20110727163610.GJ23793@redhat.com>
     [not found]   ` <20110727175624.GA3950@redhat.com>
     [not found]     ` <20110728154324.GA22864@redhat.com>
     [not found]       ` <alpine.DEB.2.00.1107281341060.16093@chino.kir.corp.google.com>
     [not found]         ` <20110729141431.GA3501@redhat.com>
     [not found]           ` <20110730143426.GA6061@redhat.com>
2011-07-30 15:22             ` mm->oom_disable_count is broken Oleg Nesterov
2011-08-01 11:52               ` KOSAKI Motohiro
2011-08-29 18:37                 ` Oleg Nesterov
2011-08-29 23:17                   ` David Rientjes
2011-08-30  7:43                     ` [patch 1/2] oom: remove oom_disable_count David Rientjes
2011-08-30  7:43                       ` David Rientjes
2011-08-30  7:43                       ` [patch 2/2] oom: fix race while temporarily setting current's oom_score_adj David Rientjes
2011-08-30  7:43                         ` David Rientjes
2011-08-30 15:57                         ` Oleg Nesterov
2011-08-30 15:57                           ` Oleg Nesterov
2011-08-30 15:28                       ` [patch 1/2] oom: remove oom_disable_count Oleg Nesterov
2011-08-30 15:28                         ` Oleg Nesterov
2011-08-30 22:06                         ` David Rientjes
2011-08-30 22:06                           ` David Rientjes
2011-08-30 16:17                     ` mm->oom_disable_count is broken Oleg Nesterov
2011-08-10 21:44 ` [PATCH 0/8] make vfork killable/restartable/traceable Pavel Machek
2011-08-11 16:09   ` Oleg Nesterov
2011-08-11 16:22     ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.