diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-17 19:09:09 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-17 19:12:33 -0400 |
commit | 0f8f86c7bdd1c954fbe153af437a0d91a6c5721a (patch) | |
tree | 94a8d419a470a4f9852ca397bb9bbe48db92ff5c /arch/x86/kernel/ptrace.c | |
parent | dca2d6ac09d9ef59ff46820d4f0c94b08a671202 (diff) | |
parent | f39cdf25bf77219676ec5360980ac40b1a7e144a (diff) |
Merge commit 'perf/core' into perf/hw-breakpoint
Conflicts:
kernel/Makefile
kernel/trace/Makefile
kernel/trace/trace.h
samples/Makefile
Merge reason: We need to be uptodate with the perf events development
branch because we plan to rewrite the breakpoints API on top of
perf events.
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 113b8927c82..267cb85b479 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -312,16 +312,6 @@ static int putreg(struct task_struct *child, | |||
312 | return set_flags(child, value); | 312 | return set_flags(child, value); |
313 | 313 | ||
314 | #ifdef CONFIG_X86_64 | 314 | #ifdef CONFIG_X86_64 |
315 | /* | ||
316 | * Orig_ax is really just a flag with small positive and | ||
317 | * negative values, so make sure to always sign-extend it | ||
318 | * from 32 bits so that it works correctly regardless of | ||
319 | * whether we come from a 32-bit environment or not. | ||
320 | */ | ||
321 | case offsetof(struct user_regs_struct, orig_ax): | ||
322 | value = (long) (s32) value; | ||
323 | break; | ||
324 | |||
325 | case offsetof(struct user_regs_struct,fs_base): | 315 | case offsetof(struct user_regs_struct,fs_base): |
326 | if (value >= TASK_SIZE_OF(child)) | 316 | if (value >= TASK_SIZE_OF(child)) |
327 | return -EIO; | 317 | return -EIO; |
@@ -1177,10 +1167,15 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value) | |||
1177 | 1167 | ||
1178 | case offsetof(struct user32, regs.orig_eax): | 1168 | case offsetof(struct user32, regs.orig_eax): |
1179 | /* | 1169 | /* |
1180 | * Sign-extend the value so that orig_eax = -1 | 1170 | * A 32-bit debugger setting orig_eax means to restore |
1181 | * causes (long)orig_ax < 0 tests to fire correctly. | 1171 | * the state of the task restarting a 32-bit syscall. |
1172 | * Make sure we interpret the -ERESTART* codes correctly | ||
1173 | * in case the task is not actually still sitting at the | ||
1174 | * exit from a 32-bit syscall with TS_COMPAT still set. | ||
1182 | */ | 1175 | */ |
1183 | regs->orig_ax = (long) (s32) value; | 1176 | regs->orig_ax = value; |
1177 | if (syscall_get_nr(child, regs) >= 0) | ||
1178 | task_thread_info(child)->status |= TS_COMPAT; | ||
1184 | break; | 1179 | break; |
1185 | 1180 | ||
1186 | case offsetof(struct user32, regs.eflags): | 1181 | case offsetof(struct user32, regs.eflags): |