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
59a2f13e
Commit
59a2f13e
authored
Apr 25, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Helper for si_code event extraction.
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
b749f4b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
ptrace.h
include/ptrace.h
+2
-0
parasite-syscall.c
parasite-syscall.c
+2
-2
ptrace.c
ptrace.c
+1
-1
No files found.
include/ptrace.h
View file @
59a2f13e
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
#define PTRACE_O_TRACEVFORKDONE 0x00000020
#define PTRACE_O_TRACEVFORKDONE 0x00000020
#define PTRACE_O_TRACEEXIT 0x00000040
#define PTRACE_O_TRACEEXIT 0x00000040
#define SI_EVENT(_si_code) (((_si_code) & 0xFFFF) >> 8)
extern
int
seize_task
(
pid_t
pid
,
pid_t
ppid
,
pid_t
*
pgid
,
pid_t
*
sid
);
extern
int
seize_task
(
pid_t
pid
,
pid_t
ppid
,
pid_t
*
pgid
,
pid_t
*
sid
);
extern
int
unseize_task
(
pid_t
pid
,
int
state
);
extern
int
unseize_task
(
pid_t
pid
,
int
state
);
extern
int
ptrace_peek_area
(
pid_t
pid
,
void
*
dst
,
void
*
addr
,
long
bytes
);
extern
int
ptrace_peek_area
(
pid_t
pid
,
void
*
dst
,
void
*
addr
,
long
bytes
);
...
...
parasite-syscall.c
View file @
59a2f13e
...
@@ -171,7 +171,7 @@ retry_signal:
...
@@ -171,7 +171,7 @@ retry_signal:
goto
err
;
goto
err
;
}
}
if
(
((
siginfo
.
si_code
&
0xffff
)
>>
8
)
!=
PTRACE_EVENT_STOP
)
if
(
SI_EVENT
(
siginfo
.
si_code
)
!=
PTRACE_EVENT_STOP
)
goto
retry_signal
;
goto
retry_signal
;
/*
/*
...
@@ -218,7 +218,7 @@ retry_signal:
...
@@ -218,7 +218,7 @@ retry_signal:
goto
err
;
goto
err
;
}
}
if
(
((
siginfo
.
si_code
&
0xffff
)
>>
8
)
!=
PTRACE_EVENT_STOP
)
{
if
(
SI_EVENT
(
siginfo
.
si_code
)
!=
PTRACE_EVENT_STOP
)
{
pr_err
(
"si_code doesn't match (pid: %d si_code: %d)
\n
"
,
pr_err
(
"si_code doesn't match (pid: %d si_code: %d)
\n
"
,
pid
,
siginfo
.
si_code
);
pid
,
siginfo
.
si_code
);
goto
err
;
goto
err
;
...
...
ptrace.c
View file @
59a2f13e
...
@@ -113,7 +113,7 @@ try_again:
...
@@ -113,7 +113,7 @@ try_again:
goto
err
;
goto
err
;
}
}
if
(
((
si
.
si_code
&
0xffff
)
>>
8
)
!=
PTRACE_EVENT_STOP
)
{
if
(
SI_EVENT
(
si
.
si_code
)
!=
PTRACE_EVENT_STOP
)
{
/*
/*
* Kernel notifies us about the task being seized received some
* Kernel notifies us about the task being seized received some
* event other than the STOP, i.e. -- a signal. Let the task
* event other than the STOP, i.e. -- a signal. Let the task
...
...
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