[Devel] Re: [PATCH 4/6] cr: checkpoint and restore task credentials

Serge E. Hallyn serue at us.ibm.com
Wed May 20 08:53:32 PDT 2009

Quoting Oren Laadan (orenl at cs.columbia.edu):
> Serge -
> The 'creator' makes the 'struct user' recursive because to save
> an object you need to first save its creator etc. However the
> implementation may not call checkpoint_obj() recursively, if
> the depth isn't bound a-priory. You probably need to convert
> checkpoint_write_user() to do an iterative (loop) implementation
> of the recursion...

It's not done recursively, though.  checkpoint_write_userns() will
only be called by checkpoint_write_user().   checkpoint_write_user()
will make sure there are only 5 levels deep of unwritten creator
user namespace (else bail), then start at the oldest creator, and
write it.  That checkpoint_write_user will cause a write of its
user_ns, then write the user, then return to the original
checkpoint_write_user() which will now write the next-oldest

So the max recursion depth we get is:

	checkpoint_task_struct -> checkpoint_write_cred ->
	checkpoint_write_user -> checkpoint_write_user ->
	checkpoint_write_userns (END)

Containers mailing list
Containers at lists.linux-foundation.org

More information about the Devel mailing list