From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oren Laadan Subject: Re: [PATCH 4/6] cr: checkpoint and restore task credentials Date: Wed, 20 May 2009 12:08:37 -0400 Message-ID: <4A142B05.4040907@cs.columbia.edu> References: <20090519014446.GA28277@us.ibm.com> <20090519014538.GD28312@us.ibm.com> <4A142350.1060308@cs.columbia.edu> <20090520155332.GA28999@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090520155332.GA28999-r/Jw6+rmf7HQT0dZR+AlfA@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: "Serge E. Hallyn" Cc: Linux Containers , David Howells List-Id: containers.vger.kernel.org Serge E. Hallyn wrote: > Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): >> 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 > user_struct > > So the max recursion depth we get is: > > checkpoint_task_struct -> checkpoint_write_cred -> > checkpoint_write_user -> checkpoint_write_user -> > checkpoint_write_userns (END) Ok. Let's not restrict to 5 levels :) Oren.