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
57b45ea5
Commit
57b45ea5
authored
Oct 24, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore: Preliminary scheme for restore
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
20ff379e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
restorer.h
include/restorer.h
+2
-1
restorer.c
restorer.c
+35
-0
No files found.
include/restorer.h
View file @
57b45ea5
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include "image.h"
#include "image.h"
#define RESTORER_ARGS_SIZE 512
#define RESTORER_ARGS_SIZE 512
#define RESTORER_SIZE
4096
#define RESTORER_SIZE
8192
long
restorer
(
long
cmd
);
long
restorer
(
long
cmd
);
...
@@ -14,6 +14,7 @@ enum {
...
@@ -14,6 +14,7 @@ enum {
RESTORER_CMD__NONE
,
RESTORER_CMD__NONE
,
RESTORER_CMD__GET_ARG_OFFSET
,
RESTORER_CMD__GET_ARG_OFFSET
,
RESTORER_CMD__PR_ARG_STRING
,
RESTORER_CMD__PR_ARG_STRING
,
RESTORER_CMD__RESTORE_CORE
,
RESTORER_CMD__MAX
,
RESTORER_CMD__MAX
,
};
};
...
...
restorer.c
View file @
57b45ea5
...
@@ -56,6 +56,41 @@ long restorer(long cmd)
...
@@ -56,6 +56,41 @@ long restorer(long cmd)
:
"memory"
);
:
"memory"
);
break
;
break
;
/*
* This one is very special, we never return there
* but use sigreturn facility to restore core registers
* and jump execution to some predefined ip read from
* core file.
*/
case
RESTORER_CMD__RESTORE_CORE
:
{
/*
* Unmap all but self, note that we reply on
* caller that it has placed this execution
* code at the VMA which we can keep mapped.
*/
/*
* Map VMAs we will need.
*/
/*
* Threads here with registers and pids
* we need.
*/
/*
* Setup a sigreturn frame.
*/
/* Finally call for sigreturn */
sys_rt_sigreturn
();
}
break
;
default:
ret
=
-
1
;
break
;
}
}
asm
volatile
(
".align "
__stringify
(
RESTORER_SIZE
));
asm
volatile
(
".align "
__stringify
(
RESTORER_SIZE
));
...
...
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