Re: [RFC v7][PATCH 2/9] General infrastructure for checkpoint restart

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oren Laadan
Date: Wednesday, October 22, 2008 - 9:02 am

Serge E. Hallyn wrote:

I'd say that checkpoint and restart are separate.

In checkpoint, you read the state and save it somewhere; you don't
modify anything in the target task (container). This equivalent to
ptrace read-mode. If you could do ptrace, you could save all that
state. In fact, you could save it in a format that is suitable for
a future restart ... (or just forge one !)

In restart, we either don't trust the user and keep everything to
be done with her credentials, of we trust the root user and allow
all operations (like loading a kernel module).

We can actually have both modes of operations. How to decide that
we trust the user is a separate question:  one option is to have
both checkpoint and restart executables setuid - checkpoint will
sign (in user space) the output image, and restart (in user space)
will validate the signature, before passing it to the kenrel. Surely
there are other ways...


yeah.. I just though about it this mornig ;)


Nope, since we will fail to restart in many cases. We will need a way
to move from caller's credentials to saved credentials, and even from
caller's credentials to privileged credentials (e.g. to reopen a file
that was created by a setuid program prior to dropping privileges).

To do that, we will need to agree on a way to escalate/change the
credentials. This however belongs to user-space (and then the binaries
for checkpoint/restart will be setuid themselves).

There will also be the issue of mapping credentials: a user A may have
one UID/GID on once system and another UID/GID on another system, and
we may want to do the conversion. This, too, can be done in user space
prior to restart by using an appropriate filter through the checkpoint
stream.

Oren.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC v7][PATCH 0/9] Kernel based checkpoint/restart, Oren Laadan, (Sun Oct 19, 10:40 pm)
[RFC v7][PATCH 3/9] x86 support for checkpoint/restart, Oren Laadan, (Sun Oct 19, 10:40 pm)
[RFC v7][PATCH 4/9] Dump memory address space, Oren Laadan, (Sun Oct 19, 10:40 pm)
[RFC v7][PATCH 5/9] Restore memory address space, Oren Laadan, (Sun Oct 19, 10:40 pm)
[RFC v7][PATCH 7/9] Infrastructure for shared objects, Oren Laadan, (Sun Oct 19, 10:40 pm)
[RFC v7][PATCH 8/9] Dump open file descriptors, Oren Laadan, (Sun Oct 19, 10:40 pm)
[RFC v7][PATCH 9/9] Restore open file descriprtors, Oren Laadan, (Sun Oct 19, 10:40 pm)
Re: [RFC v7][PATCH 0/9] Kernel based checkpoint/restart, Andrew Morton, (Tue Oct 21, 12:21 pm)
Re: [RFC v7][PATCH 2/9] General infrastructure for checkpo ..., Daniel Jacobowitz, (Tue Oct 21, 7:55 pm)
Re: [RFC v7][PATCH 0/9] Kernel based checkpoint/restart, Daniel Lezcano, (Wed Oct 22, 4:51 am)
Re: [RFC v7][PATCH 2/9] General infrastructure for checkpo ..., Daniel Jacobowitz, (Wed Oct 22, 7:29 am)
Re: [RFC v7][PATCH 2/9] General infrastructure for checkpo ..., Oren Laadan, (Wed Oct 22, 9:02 am)