[PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

Oren Laadan orenl at cs.columbia.edu
Thu Apr 30 08:40:14 PDT 2009



Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl at cs.columbia.edu):
>> 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.



More information about the Containers mailing list