diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:59:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:59:44 -0500 |
commit | 6f5621cb160fada5bc52c2961ddc86e69e478912 (patch) | |
tree | 921577f89b2bbc69813eabfd21ceedb4d7200133 /include | |
parent | c7e15899d07c9813c1aa96b21699d2d9c8314c4b (diff) | |
parent | 6dbbe14f21368a45aedba7eab0221857b8ad8d16 (diff) |
Merge branch 'x86-ptrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-ptrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, ptrace: Remove set_stopped_child_used_math() in [x]fpregs_set
x86, ptrace: Simplify xstateregs_get()
ptrace: Fix ptrace_regset() comments and diagnose errors specifically
parisc: Disable CONFIG_HAVE_ARCH_TRACEHOOK
ptrace: Add support for generic PTRACE_GETREGSET/PTRACE_SETREGSET
x86, ptrace: regset extensions to support xstate
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/elf.h | 7 | ||||
-rw-r--r-- | include/linux/ptrace.h | 20 |
2 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/elf.h b/include/linux/elf.h index 39ad4b230a4a..ad990c5f63f6 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -349,7 +349,11 @@ typedef struct elf64_shdr { | |||
349 | #define ELF_OSABI ELFOSABI_NONE | 349 | #define ELF_OSABI ELFOSABI_NONE |
350 | #endif | 350 | #endif |
351 | 351 | ||
352 | /* Notes used in ET_CORE */ | 352 | /* |
353 | * Notes used in ET_CORE. Architectures export some of the arch register sets | ||
354 | * using the corresponding note types via the PTRACE_GETREGSET and | ||
355 | * PTRACE_SETREGSET requests. | ||
356 | */ | ||
353 | #define NT_PRSTATUS 1 | 357 | #define NT_PRSTATUS 1 |
354 | #define NT_PRFPREG 2 | 358 | #define NT_PRFPREG 2 |
355 | #define NT_PRPSINFO 3 | 359 | #define NT_PRPSINFO 3 |
@@ -361,6 +365,7 @@ typedef struct elf64_shdr { | |||
361 | #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ | 365 | #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ |
362 | #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ | 366 | #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ |
363 | #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ | 367 | #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ |
368 | #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ | ||
364 | #define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ | 369 | #define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ |
365 | #define NT_S390_TIMER 0x301 /* s390 timer register */ | 370 | #define NT_S390_TIMER 0x301 /* s390 timer register */ |
366 | #define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ | 371 | #define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 56f2d63a5cbb..c5eab89da51e 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -27,6 +27,26 @@ | |||
27 | #define PTRACE_GETSIGINFO 0x4202 | 27 | #define PTRACE_GETSIGINFO 0x4202 |
28 | #define PTRACE_SETSIGINFO 0x4203 | 28 | #define PTRACE_SETSIGINFO 0x4203 |
29 | 29 | ||
30 | /* | ||
31 | * Generic ptrace interface that exports the architecture specific regsets | ||
32 | * using the corresponding NT_* types (which are also used in the core dump). | ||
33 | * Please note that the NT_PRSTATUS note type in a core dump contains a full | ||
34 | * 'struct elf_prstatus'. But the user_regset for NT_PRSTATUS contains just the | ||
35 | * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the | ||
36 | * other user_regset flavors, the user_regset layout and the ELF core dump note | ||
37 | * payload are exactly the same layout. | ||
38 | * | ||
39 | * This interface usage is as follows: | ||
40 | * struct iovec iov = { buf, len}; | ||
41 | * | ||
42 | * ret = ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, &iov); | ||
43 | * | ||
44 | * On the successful completion, iov.len will be updated by the kernel, | ||
45 | * specifying how much the kernel has written/read to/from the user's iov.buf. | ||
46 | */ | ||
47 | #define PTRACE_GETREGSET 0x4204 | ||
48 | #define PTRACE_SETREGSET 0x4205 | ||
49 | |||
30 | /* options set using PTRACE_SETOPTIONS */ | 50 | /* options set using PTRACE_SETOPTIONS */ |
31 | #define PTRACE_O_TRACESYSGOOD 0x00000001 | 51 | #define PTRACE_O_TRACESYSGOOD 0x00000001 |
32 | #define PTRACE_O_TRACEFORK 0x00000002 | 52 | #define PTRACE_O_TRACEFORK 0x00000002 |