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
da8f61c1
Commit
da8f61c1
authored
Nov 07, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump: Add GS-TLS handling
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
1f7018a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
cr-dump.c
cr-dump.c
+7
-3
types.h
include/types.h
+3
-0
No files found.
cr-dump.c
View file @
da8f61c1
...
...
@@ -552,10 +552,14 @@ static int dump_task_tls(pid_t pid, struct desc_struct *tls_array, int size)
memzero
(
tls_array
,
sizeof
(
*
tls_array
)
*
size
);
/*
pure x86-64 has a base addres
s only */
ret
=
sys_arch_prctl
(
ARCH_GET_FS
,
&
tls_array
[
0
].
base_addr
);
/*
Pure x86-64 has a base addresse
s only */
ret
=
sys_arch_prctl
(
ARCH_GET_FS
,
&
tls_array
[
FS_TLS
].
base_addr
);
if
(
ret
)
pr_err
(
"Failed to obtain TLS entry: %d
\n
"
,
ret
);
pr_err
(
"Failed to obtain FS_TLS entry: %d
\n
"
,
ret
);
ret
=
sys_arch_prctl
(
ARCH_GET_GS
,
&
tls_array
[
GS_TLS
].
base_addr
);
if
(
ret
)
pr_err
(
"Failed to obtain GS_TLS entry: %d
\n
"
,
ret
);
err:
return
ret
;
...
...
include/types.h
View file @
da8f61c1
...
...
@@ -12,6 +12,9 @@
#define ARCH_GET_FS 0x1003
#define ARCH_GET_GS 0x1004
#define FS_TLS 0
#define GS_TLS 1
/* some constants for ptrace */
#define PTRACE_SEIZE 0x4206
#define PTRACE_INTERRUPT 0x4207
...
...
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