diff options
Diffstat (limited to 'arch/x86/kernel/ptrace_64.c')
-rw-r--r-- | arch/x86/kernel/ptrace_64.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c index 1edece36044c..375fadc23a25 100644 --- a/arch/x86/kernel/ptrace_64.c +++ b/arch/x86/kernel/ptrace_64.c | |||
@@ -474,23 +474,19 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
474 | 64bit debugger to fully examine them too. Better | 474 | 64bit debugger to fully examine them too. Better |
475 | don't use it against 64bit processes, use | 475 | don't use it against 64bit processes, use |
476 | PTRACE_ARCH_PRCTL instead. */ | 476 | PTRACE_ARCH_PRCTL instead. */ |
477 | case PTRACE_SET_THREAD_AREA: { | ||
478 | struct user_desc __user *p; | ||
479 | int old; | ||
480 | p = (struct user_desc __user *)data; | ||
481 | get_user(old, &p->entry_number); | ||
482 | put_user(addr, &p->entry_number); | ||
483 | ret = do_set_thread_area(&child->thread, p); | ||
484 | put_user(old, &p->entry_number); | ||
485 | break; | ||
486 | case PTRACE_GET_THREAD_AREA: | 477 | case PTRACE_GET_THREAD_AREA: |
487 | p = (struct user_desc __user *)data; | 478 | if (addr < 0) |
488 | get_user(old, &p->entry_number); | 479 | return -EIO; |
489 | put_user(addr, &p->entry_number); | 480 | ret = do_get_thread_area(child, addr, |
490 | ret = do_get_thread_area(&child->thread, p); | 481 | (struct user_desc __user *) data); |
491 | put_user(old, &p->entry_number); | 482 | |
483 | break; | ||
484 | case PTRACE_SET_THREAD_AREA: | ||
485 | if (addr < 0) | ||
486 | return -EIO; | ||
487 | ret = do_set_thread_area(child, addr, | ||
488 | (struct user_desc __user *) data, 0); | ||
492 | break; | 489 | break; |
493 | } | ||
494 | #endif | 490 | #endif |
495 | /* normal 64bit interface to access TLS data. | 491 | /* normal 64bit interface to access TLS data. |
496 | Works just like arch_prctl, except that the arguments | 492 | Works just like arch_prctl, except that the arguments |