From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [PATCH] c/r: Save and restore task->personality (v2) Date: Thu, 16 Apr 2009 11:51:04 -0500 Message-ID: <20090416165104.GC20736@us.ibm.com> References: <1239895209-8469-1-git-send-email-danms@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1239895209-8469-1-git-send-email-danms-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: Dan Smith Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org List-Id: containers.vger.kernel.org Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org): > This patch adds a spot in the task record to save the personality value > of the task_struct. > > It also masks out READ_IMPLIES_EXEC before starting to avoid read-only > maps being restored as read-exec. To avoid re-setting this flag too early, > it also introduces a "task_ctx" object to hold information that may be > collected when reading the task structure, but needs to be restored at a > later time (such as after the maps are read). Since there may be additional > settings that need to be deferred until the end of task restore, I decided > to add the context object and a "cleanup" function to wrap things up. > > Changes in v2: > - Change __u64 to __u32 in the cr_task_hdr > > Signed-off-by: Dan Smith Acked-by: Serge Hallyn