public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@free.fr>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: akpm@linux-foundation.org, serge.hallyn@canonical.com,
	oleg@redhat.com, containers@lists.linux-foundation.org,
	gkurz@fr.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1][V3] Handle reboot in a child pid namespace
Date: Mon, 05 Dec 2011 00:08:23 +0100	[thread overview]
Message-ID: <4EDBFD67.1040009@free.fr> (raw)
In-Reply-To: <20111204212756.GB16362@khazad-dum.debian.net>

On 12/04/2011 10:27 PM, Henrique de Moraes Holschuh wrote:
> On Sun, 04 Dec 2011, Daniel Lezcano wrote:
>>  * V3
>>    - removed lock and serialization of pid_ns_reboot
>>  * V2
>>    - added a lock for the pid namespace to prevent racy call
>>      to the 'reboot' syscall
>>    - Moved 'reboot' command assigned in zap_pid_ns_processes
>>      instead of wait_task_zombie
>>    - added tasklist lock around force_sig
>>    - added do_exit in pid_ns_reboot
>>    - used task_active_pid_ns instead of declaring a new variable in sys_reboot
>>    - moved code up before POWER_OFF changed to HALT in sys_reboot
> Daniel, can you address Miquel's concern?  Is it a valid concern, or
> not?  I assume CAP_REBOOT functionality is still in place inside the
> container, so it really does look like userspace would need to know
> whether it should drop CAP_REBOOT or not, in order to automatically use
> the new feature.

Hmm, I missed its email. I think it is worth to have such ability to
detect how behaves the reboot syscall vs the pid ns. At present, if we
call 'reboot' in a child pid namespace, that will affect the host, we
are changing this behavior with this patch. I don't think there is any
application doing a shutdown from a child pid namespace, that don't
makes sense as the shutdown is invoked after killing all the processes
on the system and that could only be done from the init_pid_ns.

I would like to address this in a separate patch in order to discuss the
best way to do that. Adding a fake 'reboot' parameter returning EINVAL
or 0 seems a good solution to detect at runtime if the shutdown is
correctly supported inside a container.


  reply	other threads:[~2011-12-04 23:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-04 20:24 [PATCH 0/1][V3] Handle reboot in a child pid namespace Daniel Lezcano
2011-12-04 20:24 ` [PATCH 1/1][V3] Add reboot_pid_ns to handle the reboot syscall Daniel Lezcano
2011-12-05 18:35   ` Serge Hallyn
2011-12-05 20:42   ` Oleg Nesterov
2011-12-05 21:16     ` Daniel Lezcano
2011-12-05 21:17     ` Daniel Lezcano
2011-12-07  1:16   ` Andrew Morton
2011-12-07 15:12     ` Oleg Nesterov
2011-12-07 21:36     ` Daniel Lezcano
2011-12-04 21:27 ` [PATCH 0/1][V3] Handle reboot in a child pid namespace Henrique de Moraes Holschuh
2011-12-04 23:08   ` Daniel Lezcano [this message]
2011-12-05 20:49     ` Daniel Lezcano
2011-12-05 20:51       ` Oleg Nesterov
2011-12-05 20:50     ` Oleg Nesterov
2011-12-05 22:38       ` Miquel van Smoorenburg

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=4EDBFD67.1040009@free.fr \
    --to=daniel.lezcano@free.fr \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=gkurz@fr.ibm.com \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=serge.hallyn@canonical.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