[PATCH 7/7] binfmt: Introduce the binfmt_img exec handler

Tejun Heo tj at kernel.org
Wed Jul 20 23:51:27 PDT 2011


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/<pid>/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


More information about the Containers mailing list