diff options
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 286d9783d93f..136763568a7b 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1406,8 +1406,8 @@ static long ppc_del_hwdebug(struct task_struct *child, long addr, long data) | |||
1406 | * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls, | 1406 | * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls, |
1407 | * we mark them as obsolete now, they will be removed in a future version | 1407 | * we mark them as obsolete now, they will be removed in a future version |
1408 | */ | 1408 | */ |
1409 | static long arch_ptrace_old(struct task_struct *child, long request, long addr, | 1409 | static long arch_ptrace_old(struct task_struct *child, long request, |
1410 | long data) | 1410 | unsigned long addr, unsigned long data) |
1411 | { | 1411 | { |
1412 | switch (request) { | 1412 | switch (request) { |
1413 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ | 1413 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ |
@@ -1434,7 +1434,8 @@ static long arch_ptrace_old(struct task_struct *child, long request, long addr, | |||
1434 | return -EPERM; | 1434 | return -EPERM; |
1435 | } | 1435 | } |
1436 | 1436 | ||
1437 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 1437 | long arch_ptrace(struct task_struct *child, long request, |
1438 | unsigned long addr, unsigned long data) | ||
1438 | { | 1439 | { |
1439 | int ret = -EPERM; | 1440 | int ret = -EPERM; |
1440 | 1441 | ||
@@ -1446,11 +1447,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1446 | ret = -EIO; | 1447 | ret = -EIO; |
1447 | /* convert to index and check */ | 1448 | /* convert to index and check */ |
1448 | #ifdef CONFIG_PPC32 | 1449 | #ifdef CONFIG_PPC32 |
1449 | index = (unsigned long) addr >> 2; | 1450 | index = addr >> 2; |
1450 | if ((addr & 3) || (index > PT_FPSCR) | 1451 | if ((addr & 3) || (index > PT_FPSCR) |
1451 | || (child->thread.regs == NULL)) | 1452 | || (child->thread.regs == NULL)) |
1452 | #else | 1453 | #else |
1453 | index = (unsigned long) addr >> 3; | 1454 | index = addr >> 3; |
1454 | if ((addr & 7) || (index > PT_FPSCR)) | 1455 | if ((addr & 7) || (index > PT_FPSCR)) |
1455 | #endif | 1456 | #endif |
1456 | break; | 1457 | break; |
@@ -1474,11 +1475,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1474 | ret = -EIO; | 1475 | ret = -EIO; |
1475 | /* convert to index and check */ | 1476 | /* convert to index and check */ |
1476 | #ifdef CONFIG_PPC32 | 1477 | #ifdef CONFIG_PPC32 |
1477 | index = (unsigned long) addr >> 2; | 1478 | index = addr >> 2; |
1478 | if ((addr & 3) || (index > PT_FPSCR) | 1479 | if ((addr & 3) || (index > PT_FPSCR) |
1479 | || (child->thread.regs == NULL)) | 1480 | || (child->thread.regs == NULL)) |
1480 | #else | 1481 | #else |
1481 | index = (unsigned long) addr >> 3; | 1482 | index = addr >> 3; |
1482 | if ((addr & 7) || (index > PT_FPSCR)) | 1483 | if ((addr & 7) || (index > PT_FPSCR)) |
1483 | #endif | 1484 | #endif |
1484 | break; | 1485 | break; |