From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 7/7] binfmt: Introduce the binfmt_img exec handler Date: Thu, 21 Jul 2011 08:51:27 +0200 Message-ID: <20110721065127.GS3455@htj.dyndns.org> References: <4E204466.8010204@parallels.com> <4E204519.3040804@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4E204519.3040804-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Pavel Emelyanov Cc: Glauber Costa , Cyrill Gorcunov , Nathan Lynch , Linux Containers , Serge Hallyn , Daniel Lezcano List-Id: containers.vger.kernel.org On Fri, Jul 15, 2011 at 05:48:09PM +0400, Pavel Emelyanov wrote: > When being execve-ed the handler reads registers, mappings and provided > memory pages from image and just assigns this state on current task. This > simple functionality can be used to restore a task, whose state whas read > from e.g. /proc//dump file before. Ummm... iff the process is single threaded. :( Much more complex machinery is needed to restore full process anyway which would require some kernel facilities but definitely a lot more logic in userland. I really can't see much point in having dumper/restorer in kernel. The simplistic dumper/restorer proposed here isn't really useful - among other things, it's single threaded only and there's no mechanism to freeze the task being dumped. It is almost trivially implementable from userland using existing facilities. I wonder what the point is. Thanks. -- tejun