Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Lezcano
Date: Saturday, March 6, 2010 - 7:47 am

Eric W. Biederman wrote:
If the normal rules of parentage apply, that means pid 0 has to wait 
it's child.
If we are in the scenario of pid 0, it's child pid 1234 and we kill the 
pid 1 of the pid namespace, I suppose pid 1234 will be killed too.
The pid 0 will stay in the pid namespace and will able to fork again a 
new pid 1.

I think Serge already reported that...

That sounds good :)
And also the rootfs for executing the command inside the container (eg. 
shutdown), the uid/gid (if there is a user namespace), the mount points, ...
But I suppose we can do the same with setns for all the namespaces and 
chrooting within the container rootfs.

What I see is a problem with the tty. For example, we cloneat the init 
process of the container which is usually /sbin/init but this one has 
its tty mapped to /dev/console, so the output of the exec'ed command 
will go to the console.
Right.

I agree, it's some kind of "ghost" process.
IMO, with a bit of userspace code it would be possible to enter or exec 
a command inside a container with nsfd, setns.

+1 to test your patchset Eric :)

Just a mindless suggestion, the "nsopen" / "nsattach" syscall names 
should be more clear no ?

Jumping back, one question about the nsfd and the poll for waiting the 
end of the namespace.
If we have an openened file descriptor on a specific namespace, we grab 
a reference on this one, so the namespace won't be destroyed until we 
close the fd which is used to poll the end of the namespace, no ? Did I 
miss something ?

Thanks
  -- Daniel
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH] ns: Syscalls for better namespace sharing con ..., Eric W. Biederman, (Thu Feb 25, 1:57 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 2:49 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 2:54 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 3:31 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 5:53 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 6:26 pm)
[RFC][PATCH] ns: Syscalls for better namespace sharing con ..., Eric W. Biederman, (Thu Feb 25, 8:15 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 1:35 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 2:24 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 2:42 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 2:49 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 3:16 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 4:13 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 2:04 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 2:42 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 12:08 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 12:44 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Mon Mar 1, 12:24 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Sukadev Bhattiprolu, (Tue Mar 2, 2:19 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Sukadev Bhattiprolu, (Tue Mar 2, 5:07 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Wed Mar 3, 12:47 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Daniel Lezcano, (Sat Mar 6, 7:47 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Mon Mar 8, 10:29 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Mon Mar 8, 10:35 am)