Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
8fdc7070
Commit
8fdc7070
authored
Mar 01, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vma: Helper, that checks whether vma is dumped via parasite
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
b71f9e80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
25 deletions
+33
-25
cr-dump.c
cr-dump.c
+31
-0
crtools.h
include/crtools.h
+1
-0
parasite-syscall.c
parasite-syscall.c
+1
-25
No files found.
cr-dump.c
View file @
8fdc7070
...
@@ -62,6 +62,37 @@
...
@@ -62,6 +62,37 @@
static
char
loc_buf
[
PAGE_SIZE
];
static
char
loc_buf
[
PAGE_SIZE
];
static
int
pidns_proc
=
-
1
;
static
int
pidns_proc
=
-
1
;
bool
privately_dump_vma
(
struct
vma_area
*
vma
)
{
/*
* The special areas are not dumped.
*/
if
(
!
(
vma
->
vma
.
status
&
VMA_AREA_REGULAR
))
return
false
;
/* No dumps for file-shared mappings */
if
(
vma
->
vma
.
status
&
VMA_FILE_SHARED
)
return
false
;
/* No dumps for SYSV IPC mappings */
if
(
vma
->
vma
.
status
&
VMA_AREA_SYSVIPC
)
return
false
;
if
(
vma_area_is
(
vma
,
VMA_ANON_SHARED
))
return
false
;
if
(
!
vma_area_is
(
vma
,
VMA_ANON_PRIVATE
)
&&
!
vma_area_is
(
vma
,
VMA_FILE_PRIVATE
))
{
pr_warn
(
"Unexpected VMA area found
\n
"
);
return
false
;
}
if
(
vma
->
vma
.
end
>
TASK_SIZE
)
return
false
;
return
true
;
}
void
free_mappings
(
struct
vm_area_list
*
vma_area_list
)
void
free_mappings
(
struct
vm_area_list
*
vma_area_list
)
{
{
struct
vma_area
*
vma_area
,
*
p
;
struct
vma_area
*
vma_area
,
*
p
;
...
...
include/crtools.h
View file @
8fdc7070
...
@@ -225,6 +225,7 @@ struct vm_area_list {
...
@@ -225,6 +225,7 @@ struct vm_area_list {
int
collect_mappings
(
pid_t
pid
,
struct
vm_area_list
*
vma_area_list
);
int
collect_mappings
(
pid_t
pid
,
struct
vm_area_list
*
vma_area_list
);
void
free_mappings
(
struct
vm_area_list
*
vma_area_list
);
void
free_mappings
(
struct
vm_area_list
*
vma_area_list
);
bool
privately_dump_vma
(
struct
vma_area
*
vma
);
struct
vma_area
{
struct
vma_area
{
struct
list_head
list
;
struct
list_head
list
;
...
...
parasite-syscall.c
View file @
8fdc7070
...
@@ -511,33 +511,9 @@ int parasite_dump_pages_seized(struct parasite_ctl *ctl, struct vm_area_list *vm
...
@@ -511,33 +511,9 @@ int parasite_dump_pages_seized(struct parasite_ctl *ctl, struct vm_area_list *vm
parasite_dumppages
=
parasite_args
(
ctl
,
struct
parasite_dump_pages_args
);
parasite_dumppages
=
parasite_args
(
ctl
,
struct
parasite_dump_pages_args
);
list_for_each_entry
(
vma_area
,
&
vma_area_list
->
h
,
list
)
{
list_for_each_entry
(
vma_area
,
&
vma_area_list
->
h
,
list
)
{
/*
* The special areas are not dumped.
*/
if
(
!
(
vma_area
->
vma
.
status
&
VMA_AREA_REGULAR
))
continue
;
/* No dumps for file-shared mappings */
if
(
vma_area
->
vma
.
status
&
VMA_FILE_SHARED
)
continue
;
/* No dumps for SYSV IPC mappings */
if
(
vma_area
->
vma
.
status
&
VMA_AREA_SYSVIPC
)
continue
;
if
(
vma_area_is
(
vma_area
,
VMA_ANON_SHARED
))
continue
;
parasite_dumppages
->
vma_entry
=
vma_area
->
vma
;
parasite_dumppages
->
vma_entry
=
vma_area
->
vma
;
if
(
!
vma_area_is
(
vma_area
,
VMA_ANON_PRIVATE
)
&&
if
(
!
privately_dump_vma
(
vma_area
))
!
vma_area_is
(
vma_area
,
VMA_FILE_PRIVATE
))
{
pr_warn
(
"Unexpected VMA area found
\n
"
);
continue
;
}
if
(
vma_area
->
vma
.
end
>
TASK_SIZE
)
continue
;
continue
;
ret
=
parasite_execute
(
PARASITE_CMD_DUMPPAGES
,
ctl
);
ret
=
parasite_execute
(
PARASITE_CMD_DUMPPAGES
,
ctl
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment