-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 24870 b: refs/heads/master c: aa6758d h: refs/heads/master v: v3
- Loading branch information
Paolo 'Blaisorblade' Giarrusso
authored and
Linus Torvalds
committed
Mar 31, 2006
1 parent
279b88c
commit 29cab3a
Showing
22 changed files
with
581 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 972410b0232e97609fcefc8e408fe3037fcd607b | ||
refs/heads/master: aa6758d4867cd07bd76105ade6177fe6148e559a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#include <errno.h> | ||
#include <sys/ptrace.h> | ||
#include <asm/ldt.h> | ||
#include "uml-config.h" | ||
|
||
/* TLS support - we basically rely on the host's one.*/ | ||
|
||
/* In TT mode, this should be called only by the tracing thread, and makes sense | ||
* only for PTRACE_SET_THREAD_AREA. In SKAS mode, it's used normally. | ||
* | ||
*/ | ||
|
||
#ifndef PTRACE_GET_THREAD_AREA | ||
#define PTRACE_GET_THREAD_AREA 25 | ||
#endif | ||
|
||
#ifndef PTRACE_SET_THREAD_AREA | ||
#define PTRACE_SET_THREAD_AREA 26 | ||
#endif | ||
|
||
int os_set_thread_area(void *data, int pid) | ||
{ | ||
struct user_desc *info = data; | ||
int ret; | ||
|
||
ret = ptrace(PTRACE_SET_THREAD_AREA, pid, info->entry_number, | ||
(unsigned long) info); | ||
if (ret < 0) | ||
ret = -errno; | ||
return ret; | ||
} | ||
|
||
#ifdef UML_CONFIG_MODE_SKAS | ||
|
||
int os_get_thread_area(void *data, int pid) | ||
{ | ||
struct user_desc *info = data; | ||
int ret; | ||
|
||
ret = ptrace(PTRACE_GET_THREAD_AREA, pid, info->entry_number, | ||
(unsigned long) info); | ||
if (ret < 0) | ||
ret = -errno; | ||
return ret; | ||
} | ||
|
||
#endif | ||
|
||
#ifdef UML_CONFIG_MODE_TT | ||
#include "linux/unistd.h" | ||
|
||
_syscall1(int, get_thread_area, struct user_desc *, u_info); | ||
_syscall1(int, set_thread_area, struct user_desc *, u_info); | ||
|
||
int do_set_thread_area_tt(struct user_desc *info) | ||
{ | ||
int ret; | ||
|
||
ret = set_thread_area(info); | ||
if (ret < 0) { | ||
ret = -errno; | ||
} | ||
return ret; | ||
} | ||
|
||
int do_get_thread_area_tt(struct user_desc *info) | ||
{ | ||
int ret; | ||
|
||
ret = get_thread_area(info); | ||
if (ret < 0) { | ||
ret = -errno; | ||
} | ||
return ret; | ||
} | ||
|
||
#endif /* UML_CONFIG_MODE_TT */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.