diff options
author | Anton Blanchard <anton@samba.org> | 2012-04-17 15:36:21 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-30 01:37:28 -0400 |
commit | ec34a6814988f17506733c1e8b058ce46602591d (patch) | |
tree | 1d9132a700854931655b108e4edb34e03ea17c87 | |
parent | 14fb1fa6e266fb9c4622b210d2636a2004a47e2b (diff) |
powerpc: Remove old powerpc specific ptrace getregs/setregs calls
PowerPC has non standard getregs calls that only dump the GPRs or
FPRs and have their arguments reversed. commit e17666ba48f7 (ptrace
updates & new, better requests) in 2.6.3 deprecated them and introduced
more standard versions.
It's been about 5 years and I know of no users of the old calls so
lets remove them.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/include/asm/ptrace.h | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 42 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace32.c | 32 |
3 files changed, 0 insertions, 80 deletions
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 84cc7840cd18..9c21ed42aba6 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
@@ -354,12 +354,6 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, | |||
354 | #define PTRACE_GETREGS64 22 | 354 | #define PTRACE_GETREGS64 22 |
355 | #define PTRACE_SETREGS64 23 | 355 | #define PTRACE_SETREGS64 23 |
356 | 356 | ||
357 | /* (old) PTRACE requests with inverted arguments */ | ||
358 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | ||
359 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | ||
360 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | ||
361 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | ||
362 | |||
363 | /* Calls to trace a 64bit program from a 32bit program */ | 357 | /* Calls to trace a 64bit program from a 32bit program */ |
364 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | 358 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 |
365 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | 359 | #define PPC_PTRACE_PEEKDATA_3264 0x94 |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 8d8e028893be..ac3cb008fb31 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1432,40 +1432,6 @@ static long ppc_del_hwdebug(struct task_struct *child, long addr, long data) | |||
1432 | #endif | 1432 | #endif |
1433 | } | 1433 | } |
1434 | 1434 | ||
1435 | /* | ||
1436 | * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls, | ||
1437 | * we mark them as obsolete now, they will be removed in a future version | ||
1438 | */ | ||
1439 | static long arch_ptrace_old(struct task_struct *child, long request, | ||
1440 | unsigned long addr, unsigned long data) | ||
1441 | { | ||
1442 | void __user *datavp = (void __user *) data; | ||
1443 | |||
1444 | switch (request) { | ||
1445 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ | ||
1446 | return copy_regset_to_user(child, &user_ppc_native_view, | ||
1447 | REGSET_GPR, 0, 32 * sizeof(long), | ||
1448 | datavp); | ||
1449 | |||
1450 | case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */ | ||
1451 | return copy_regset_from_user(child, &user_ppc_native_view, | ||
1452 | REGSET_GPR, 0, 32 * sizeof(long), | ||
1453 | datavp); | ||
1454 | |||
1455 | case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */ | ||
1456 | return copy_regset_to_user(child, &user_ppc_native_view, | ||
1457 | REGSET_FPR, 0, 32 * sizeof(double), | ||
1458 | datavp); | ||
1459 | |||
1460 | case PPC_PTRACE_SETFPREGS: /* Set FPRs 0 - 31. */ | ||
1461 | return copy_regset_from_user(child, &user_ppc_native_view, | ||
1462 | REGSET_FPR, 0, 32 * sizeof(double), | ||
1463 | datavp); | ||
1464 | } | ||
1465 | |||
1466 | return -EPERM; | ||
1467 | } | ||
1468 | |||
1469 | long arch_ptrace(struct task_struct *child, long request, | 1435 | long arch_ptrace(struct task_struct *child, long request, |
1470 | unsigned long addr, unsigned long data) | 1436 | unsigned long addr, unsigned long data) |
1471 | { | 1437 | { |
@@ -1687,14 +1653,6 @@ long arch_ptrace(struct task_struct *child, long request, | |||
1687 | datavp); | 1653 | datavp); |
1688 | #endif | 1654 | #endif |
1689 | 1655 | ||
1690 | /* Old reverse args ptrace callss */ | ||
1691 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ | ||
1692 | case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */ | ||
1693 | case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */ | ||
1694 | case PPC_PTRACE_SETFPREGS: /* Get FPRs 0 - 31. */ | ||
1695 | ret = arch_ptrace_old(child, request, addr, data); | ||
1696 | break; | ||
1697 | |||
1698 | default: | 1656 | default: |
1699 | ret = ptrace_request(child, request, addr, data); | 1657 | ret = ptrace_request(child, request, addr, data); |
1700 | break; | 1658 | break; |
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 469349d14a97..8c21658719d9 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
@@ -39,30 +39,6 @@ | |||
39 | * in exit.c or in signal.c. | 39 | * in exit.c or in signal.c. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | /* | ||
43 | * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls, | ||
44 | * we mark them as obsolete now, they will be removed in a future version | ||
45 | */ | ||
46 | static long compat_ptrace_old(struct task_struct *child, long request, | ||
47 | long addr, long data) | ||
48 | { | ||
49 | switch (request) { | ||
50 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ | ||
51 | return copy_regset_to_user(child, | ||
52 | task_user_regset_view(current), 0, | ||
53 | 0, 32 * sizeof(compat_long_t), | ||
54 | compat_ptr(data)); | ||
55 | |||
56 | case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */ | ||
57 | return copy_regset_from_user(child, | ||
58 | task_user_regset_view(current), 0, | ||
59 | 0, 32 * sizeof(compat_long_t), | ||
60 | compat_ptr(data)); | ||
61 | } | ||
62 | |||
63 | return -EPERM; | ||
64 | } | ||
65 | |||
66 | /* Macros to workout the correct index for the FPR in the thread struct */ | 42 | /* Macros to workout the correct index for the FPR in the thread struct */ |
67 | #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1) | 43 | #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1) |
68 | #define FPRHALF(i) (((i) - PT_FPR0) & 1) | 44 | #define FPRHALF(i) (((i) - PT_FPR0) & 1) |
@@ -308,8 +284,6 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
308 | case PTRACE_SETVSRREGS: | 284 | case PTRACE_SETVSRREGS: |
309 | case PTRACE_GETREGS64: | 285 | case PTRACE_GETREGS64: |
310 | case PTRACE_SETREGS64: | 286 | case PTRACE_SETREGS64: |
311 | case PPC_PTRACE_GETFPREGS: | ||
312 | case PPC_PTRACE_SETFPREGS: | ||
313 | case PTRACE_KILL: | 287 | case PTRACE_KILL: |
314 | case PTRACE_SINGLESTEP: | 288 | case PTRACE_SINGLESTEP: |
315 | case PTRACE_DETACH: | 289 | case PTRACE_DETACH: |
@@ -322,12 +296,6 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
322 | ret = arch_ptrace(child, request, addr, data); | 296 | ret = arch_ptrace(child, request, addr, data); |
323 | break; | 297 | break; |
324 | 298 | ||
325 | /* Old reverse args ptrace callss */ | ||
326 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ | ||
327 | case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */ | ||
328 | ret = compat_ptrace_old(child, request, addr, data); | ||
329 | break; | ||
330 | |||
331 | default: | 299 | default: |
332 | ret = compat_ptrace_request(child, request, addr, data); | 300 | ret = compat_ptrace_request(child, request, addr, data); |
333 | break; | 301 | break; |