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
b5dfd452
Commit
b5dfd452
authored
Mar 27, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump: Be more specific about inability to dump 32bit tasks on x86
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
f95d509d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
crtools.c
arch/arm/crtools.c
+2
-2
crtools.c
arch/x86/crtools.c
+11
-1
parasite-syscall.h
include/parasite-syscall.h
+1
-1
parasite-syscall.c
parasite-syscall.c
+1
-3
No files found.
arch/arm/crtools.c
View file @
b5dfd452
...
@@ -46,12 +46,12 @@ void parasite_setup_regs(unsigned long new_ip, user_regs_struct_t *regs)
...
@@ -46,12 +46,12 @@ void parasite_setup_regs(unsigned long new_ip, user_regs_struct_t *regs)
regs
->
ARM_cpsr
&=
PSR_f
|
PSR_s
|
PSR_x
|
PSR_T_BIT
|
MODE32_BIT
;
regs
->
ARM_cpsr
&=
PSR_f
|
PSR_s
|
PSR_x
|
PSR_T_BIT
|
MODE32_BIT
;
}
}
int
task_in_compat_mode
(
pid_t
pid
)
bool
arch_can_dump_task
(
pid_t
pid
)
{
{
/*
/*
* TODO: Add proper check here
* TODO: Add proper check here
*/
*/
return
0
;
return
true
;
}
}
int
syscall_seized
(
struct
parasite_ctl
*
ctl
,
int
nr
,
unsigned
long
*
ret
,
int
syscall_seized
(
struct
parasite_ctl
*
ctl
,
int
nr
,
unsigned
long
*
ret
,
...
...
arch/x86/crtools.c
View file @
b5dfd452
...
@@ -46,7 +46,7 @@ void parasite_setup_regs(unsigned long new_ip, user_regs_struct_t *regs)
...
@@ -46,7 +46,7 @@ void parasite_setup_regs(unsigned long new_ip, user_regs_struct_t *regs)
regs
->
flags
&=
~
(
X86_EFLAGS_TF
|
X86_EFLAGS_DF
|
X86_EFLAGS_IF
);
regs
->
flags
&=
~
(
X86_EFLAGS_TF
|
X86_EFLAGS_DF
|
X86_EFLAGS_IF
);
}
}
int
task_in_compat_mode
(
pid_t
pid
)
static
int
task_in_compat_mode
(
pid_t
pid
)
{
{
unsigned
long
cs
,
ds
;
unsigned
long
cs
,
ds
;
...
@@ -68,6 +68,16 @@ int task_in_compat_mode(pid_t pid)
...
@@ -68,6 +68,16 @@ int task_in_compat_mode(pid_t pid)
return
cs
!=
0x33
||
ds
==
0x2b
;
return
cs
!=
0x33
||
ds
==
0x2b
;
}
}
bool
arch_can_dump_task
(
pid_t
pid
)
{
if
(
task_in_compat_mode
(
pid
))
{
pr_err
(
"Can't dump task %d running in 32-bit mode
\n
"
,
pid
);
return
false
;
}
return
true
;
}
int
syscall_seized
(
struct
parasite_ctl
*
ctl
,
int
nr
,
unsigned
long
*
ret
,
int
syscall_seized
(
struct
parasite_ctl
*
ctl
,
int
nr
,
unsigned
long
*
ret
,
unsigned
long
arg1
,
unsigned
long
arg1
,
unsigned
long
arg2
,
unsigned
long
arg2
,
...
...
include/parasite-syscall.h
View file @
b5dfd452
...
@@ -74,6 +74,6 @@ int syscall_seized(struct parasite_ctl *ctl, int nr, unsigned long *ret,
...
@@ -74,6 +74,6 @@ int syscall_seized(struct parasite_ctl *ctl, int nr, unsigned long *ret,
unsigned
long
arg6
);
unsigned
long
arg6
);
extern
int
__parasite_execute
(
struct
parasite_ctl
*
ctl
,
pid_t
pid
,
user_regs_struct_t
*
regs
);
extern
int
__parasite_execute
(
struct
parasite_ctl
*
ctl
,
pid_t
pid
,
user_regs_struct_t
*
regs
);
extern
int
task_in_compat_mode
(
pid_t
pid
);
extern
bool
arch_can_dump_task
(
pid_t
pid
);
#endif
/* __CR_PARASITE_SYSCALL_H__ */
#endif
/* __CR_PARASITE_SYSCALL_H__ */
parasite-syscall.c
View file @
b5dfd452
...
@@ -767,10 +767,8 @@ struct parasite_ctl *parasite_prep_ctl(pid_t pid, struct vm_area_list *vma_area_
...
@@ -767,10 +767,8 @@ struct parasite_ctl *parasite_prep_ctl(pid_t pid, struct vm_area_list *vma_area_
struct
parasite_ctl
*
ctl
=
NULL
;
struct
parasite_ctl
*
ctl
=
NULL
;
struct
vma_area
*
vma_area
;
struct
vma_area
*
vma_area
;
if
(
task_in_compat_mode
(
pid
))
{
if
(
!
arch_can_dump_task
(
pid
))
pr_err
(
"Can't checkpoint task running in compat mode
\n
"
);
goto
err
;
goto
err
;
}
/*
/*
* Control block early setup.
* Control block early setup.
...
...
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