From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oren Laadan Subject: Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl Date: Thu, 30 Apr 2009 11:40:14 -0400 Message-ID: <49F9C65E.8050508@cs.columbia.edu> References: <20090424210608.GA16973@us.ibm.com> <20090425083908.GA2767@us.ibm.com> <20090430145735.GA19684@us.ibm.com> <49F9C044.8040907@cs.columbia.edu> <20090430152615.GC19684@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090430152615.GC19684-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 , Alexey Dobriyan List-Id: containers.vger.kernel.org Serge E. Hallyn wrote: > Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): >> Hmmm... IIUC from the text above then: >> >> ptr = mmap(NULL, size, MMAP_EXEC | ... ) >> memcpy(ptr, src, size); >> mremap(src, size, size, MREMAP_FIXED | ..., ptr); > > What is src and size? src is the address of a code section that you want to remap into anonymous memory (to "release" the executable). size is its size. there may be more than one section, of course. > > Hmm, I guess you can get that from /proc/self/maps. > > Cool. :) Oren.