diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 22:15:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 22:15:20 -0400 |
commit | f59b51fe3d3092c08d7d554ecb40db24011b2ebc (patch) | |
tree | f19a5cb72adda3963f83609dbe2314620a4cf63e /arch/x86/um/asm/ptrace.h | |
parent | aac2b1f5747ea34696d0da5bdc4d8247aa6437af (diff) | |
parent | 062d52672446014222942cae6934d97769b329f0 (diff) |
Merge branch 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML changes from Richard Weinberger:
"UML receives this time only cleanups.
The most outstanding change is the 'include "foo.h"' do 'include
<foo.h>' conversion done by Al Viro.
It touches many files, that's why the diffstat is rather big."
* 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
typo in UserModeLinux-HOWTO
hppfs: fix the return value of get_inode()
hostfs: drop vmtruncate
um: get rid of pointless include "..." where include <...> will do
um: move sysrq.h out of include/shared
um/x86: merge 32 and 64 bit variants of ptrace.h
um/x86: merge 32 and 64bit variants of checksum.h
Diffstat (limited to 'arch/x86/um/asm/ptrace.h')
-rw-r--r-- | arch/x86/um/asm/ptrace.h | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/arch/x86/um/asm/ptrace.h b/arch/x86/um/asm/ptrace.h index e72cd0df5ba3..755133258c45 100644 --- a/arch/x86/um/asm/ptrace.h +++ b/arch/x86/um/asm/ptrace.h | |||
@@ -1,11 +1,13 @@ | |||
1 | #ifndef __UM_X86_PTRACE_H | 1 | #ifndef __UM_X86_PTRACE_H |
2 | #define __UM_X86_PTRACE_H | 2 | #define __UM_X86_PTRACE_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #include <linux/compiler.h> |
5 | # include "ptrace_32.h" | 5 | #ifndef CONFIG_X86_32 |
6 | #else | 6 | #define __FRAME_OFFSETS /* Needed to get the R* macros */ |
7 | # include "ptrace_64.h" | ||
8 | #endif | 7 | #endif |
8 | #include <asm/ptrace-generic.h> | ||
9 | |||
10 | #define user_mode(r) UPT_IS_USER(&(r)->regs) | ||
9 | 11 | ||
10 | #define PT_REGS_AX(r) UPT_AX(&(r)->regs) | 12 | #define PT_REGS_AX(r) UPT_AX(&(r)->regs) |
11 | #define PT_REGS_BX(r) UPT_BX(&(r)->regs) | 13 | #define PT_REGS_BX(r) UPT_BX(&(r)->regs) |
@@ -36,4 +38,52 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
36 | { | 38 | { |
37 | return PT_REGS_AX(regs); | 39 | return PT_REGS_AX(regs); |
38 | } | 40 | } |
41 | |||
42 | /* | ||
43 | * Forward declaration to avoid including sysdep/tls.h, which causes a | ||
44 | * circular include, and compilation failures. | ||
45 | */ | ||
46 | struct user_desc; | ||
47 | |||
48 | #ifdef CONFIG_X86_32 | ||
49 | |||
50 | #define HOST_AUDIT_ARCH AUDIT_ARCH_I386 | ||
51 | |||
52 | extern int ptrace_get_thread_area(struct task_struct *child, int idx, | ||
53 | struct user_desc __user *user_desc); | ||
54 | |||
55 | extern int ptrace_set_thread_area(struct task_struct *child, int idx, | ||
56 | struct user_desc __user *user_desc); | ||
57 | |||
58 | #else | ||
59 | |||
60 | #define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64 | ||
61 | |||
62 | #define PT_REGS_R8(r) UPT_R8(&(r)->regs) | ||
63 | #define PT_REGS_R9(r) UPT_R9(&(r)->regs) | ||
64 | #define PT_REGS_R10(r) UPT_R10(&(r)->regs) | ||
65 | #define PT_REGS_R11(r) UPT_R11(&(r)->regs) | ||
66 | #define PT_REGS_R12(r) UPT_R12(&(r)->regs) | ||
67 | #define PT_REGS_R13(r) UPT_R13(&(r)->regs) | ||
68 | #define PT_REGS_R14(r) UPT_R14(&(r)->regs) | ||
69 | #define PT_REGS_R15(r) UPT_R15(&(r)->regs) | ||
70 | |||
71 | #include <asm/errno.h> | ||
72 | |||
73 | static inline int ptrace_get_thread_area(struct task_struct *child, int idx, | ||
74 | struct user_desc __user *user_desc) | ||
75 | { | ||
76 | return -ENOSYS; | ||
77 | } | ||
78 | |||
79 | static inline int ptrace_set_thread_area(struct task_struct *child, int idx, | ||
80 | struct user_desc __user *user_desc) | ||
81 | { | ||
82 | return -ENOSYS; | ||
83 | } | ||
84 | |||
85 | extern long arch_prctl(struct task_struct *task, int code, | ||
86 | unsigned long __user *addr); | ||
87 | |||
88 | #endif | ||
39 | #endif /* __UM_X86_PTRACE_H */ | 89 | #endif /* __UM_X86_PTRACE_H */ |