Commit 3bd6d9d7 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

image: Add comments about VMA_AREA constants and drop FORCE_READ flag

Force-read came from very first dev version of CRIU (even before 1.0 release)
and never been used actually in image.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 48032d87
...@@ -38,12 +38,57 @@ ...@@ -38,12 +38,57 @@
#define USK_SERVICE (1 << 1) #define USK_SERVICE (1 << 1)
#define USK_CALLBACK (1 << 2) #define USK_CALLBACK (1 << 2)
/*
* VMA_AREA status:
*
* - none
* VmaEntry is just allocated and has not been used
* for anything yet
* - regular
* VmaEntry represent some memory area which should be
* dumped and restored; this is a general sign that we
* should not skip the area content from processing in
* compare with special areas such as vsyscall
* - stack
* the memory area is used in application stack so we
* should be careful about guard page here
* - vsyscall
* special memory area injected into the task memory
* space by the kernel itself, represent virtual syscall
* implementation and it is specific to every kernel version,
* its contents should not be dumped ever
* - vdso,vvar
* the vDSO area, it might reqire additional memory
* contents modification especially when tasks are
* migrating between different kernel versions
* - heap
* "heap" area in application, currently for inforamtion only
* - file private
* stands for privately memory mapped files
* - file shared
* stands for shared memory mapped files
* - anon shared
* represent shared anonymous memory areas
* - anon private
* represent private anonymous memory areas
* - SysV IPC
* IPC shared memory area
* - socket
* memory map for socket
* - AIO ring
* memory area serves AIO buffers
* - unsupported
* stands for any unknown memory areas, usually means
* we don't know how to work with it and should stop
* processing exiting with error; while the rest of bits
* are part of image ABI, this particular one must never
* be used in image.
*/
#define VMA_AREA_NONE (0 << 0) #define VMA_AREA_NONE (0 << 0)
#define VMA_AREA_REGULAR (1 << 0) /* Dumpable area */ #define VMA_AREA_REGULAR (1 << 0)
#define VMA_AREA_STACK (1 << 1) #define VMA_AREA_STACK (1 << 1)
#define VMA_AREA_VSYSCALL (1 << 2) #define VMA_AREA_VSYSCALL (1 << 2)
#define VMA_AREA_VDSO (1 << 3) #define VMA_AREA_VDSO (1 << 3)
#define VMA_FORCE_READ (1 << 4) /* VMA changed to be readable */
#define VMA_AREA_HEAP (1 << 5) #define VMA_AREA_HEAP (1 << 5)
#define VMA_FILE_PRIVATE (1 << 6) #define VMA_FILE_PRIVATE (1 << 6)
...@@ -56,7 +101,7 @@ ...@@ -56,7 +101,7 @@
#define VMA_AREA_VVAR (1 << 12) #define VMA_AREA_VVAR (1 << 12)
#define VMA_AREA_AIORING (1 << 13) #define VMA_AREA_AIORING (1 << 13)
#define VMA_UNSUPP (1 << 31) /* Unsupported VMA */ #define VMA_UNSUPP (1 << 31)
#define CR_CAP_SIZE 2 #define CR_CAP_SIZE 2
......
...@@ -62,7 +62,6 @@ static void vma_opt_str(const struct vma_area *v, char *opt) ...@@ -62,7 +62,6 @@ static void vma_opt_str(const struct vma_area *v, char *opt)
opt2s(VMA_AREA_VSYSCALL, "vsys"); opt2s(VMA_AREA_VSYSCALL, "vsys");
opt2s(VMA_AREA_VDSO, "vdso"); opt2s(VMA_AREA_VDSO, "vdso");
opt2s(VMA_AREA_VVAR, "vvar"); opt2s(VMA_AREA_VVAR, "vvar");
opt2s(VMA_FORCE_READ, "frd");
opt2s(VMA_AREA_HEAP, "heap"); opt2s(VMA_AREA_HEAP, "heap");
opt2s(VMA_FILE_PRIVATE, "fp"); opt2s(VMA_FILE_PRIVATE, "fp");
opt2s(VMA_FILE_SHARED, "fs"); opt2s(VMA_FILE_SHARED, "fs");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment