diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:27:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:07 -0400 |
commit | e8012b584fac3a1bb70cd896612c12086d28e9ff (patch) | |
tree | 0ec406be2ad1878b601c6e97ad6216764ddae942 /arch/um/kernel | |
parent | a5f6096c805e6d2fa03ee932f8c70af34cee41a0 (diff) |
uml: ptrace floating point fixes
Handle floating point state better in ptrace. The code now correctly
distinguishes between PTRACE_[GS]ETFPREGS and PTRACE_[GS]ETFPXREGS. The FPX
requests get handed off to arch-specific code because that's not generic.
get_fpregs, set_fpregs, set_fpregs, and set_fpxregs needed real
implementations.
Something here exposed a missing include in asm/page.h, which needed
linux/types.h in order to get gfp_t, so that's fixed here.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/ptrace.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index db55a017e9b9..2511f9199417 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -143,22 +143,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
143 | #endif | 143 | #endif |
144 | #ifdef PTRACE_GETFPREGS | 144 | #ifdef PTRACE_GETFPREGS |
145 | case PTRACE_GETFPREGS: /* Get the child FPU state. */ | 145 | case PTRACE_GETFPREGS: /* Get the child FPU state. */ |
146 | ret = get_fpregs(data, child); | 146 | ret = get_fpregs((struct user_i387_struct __user *) data, |
147 | child); | ||
147 | break; | 148 | break; |
148 | #endif | 149 | #endif |
149 | #ifdef PTRACE_SETFPREGS | 150 | #ifdef PTRACE_SETFPREGS |
150 | case PTRACE_SETFPREGS: /* Set the child FPU state. */ | 151 | case PTRACE_SETFPREGS: /* Set the child FPU state. */ |
151 | ret = set_fpregs(data, child); | 152 | ret = set_fpregs((struct user_i387_struct __user *) data, |
152 | break; | 153 | child); |
153 | #endif | ||
154 | #ifdef PTRACE_GETFPXREGS | ||
155 | case PTRACE_GETFPXREGS: /* Get the child FPU state. */ | ||
156 | ret = get_fpxregs(data, child); | ||
157 | break; | ||
158 | #endif | ||
159 | #ifdef PTRACE_SETFPXREGS | ||
160 | case PTRACE_SETFPXREGS: /* Set the child FPU state. */ | ||
161 | ret = set_fpxregs(data, child); | ||
162 | break; | 154 | break; |
163 | #endif | 155 | #endif |
164 | case PTRACE_GET_THREAD_AREA: | 156 | case PTRACE_GET_THREAD_AREA: |
@@ -227,6 +219,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
227 | #endif | 219 | #endif |
228 | default: | 220 | default: |
229 | ret = ptrace_request(child, request, addr, data); | 221 | ret = ptrace_request(child, request, addr, data); |
222 | if (ret == -EIO) | ||
223 | ret = subarch_ptrace(child, request, addr, data); | ||
230 | break; | 224 | break; |
231 | } | 225 | } |
232 | 226 | ||