aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-02-07 01:08:18 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-07 05:59:22 -0500
commit190aa9f60f9575d1b7382cd1ee33e2589208c514 (patch)
tree2707306174f13b26751f6264a4fceee00ef26ed1
parent38282764e3e76aa02c071af4673e6b6320e426ad (diff)
[SPARC]: Remove PTRACE_SUN* handling.
Supporting SunOS ptrace() is pretty pointless and these kinds of quirks keep us from being able to share more code with other platforms. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/kernel/ptrace.c15
-rw-r--r--arch/sparc64/kernel/ptrace.c15
-rw-r--r--include/asm-sparc/ptrace.h2
-rw-r--r--include/asm-sparc64/ptrace.h2
4 files changed, 2 insertions, 32 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c
index 0619958ecfdc..29fa6e5cb450 100644
--- a/arch/sparc/kernel/ptrace.c
+++ b/arch/sparc/kernel/ptrace.c
@@ -556,8 +556,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
556 goto out; 556 goto out;
557 } 557 }
558 558
559 if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH) 559 if (request == PTRACE_ATTACH) {
560 || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
561 if (ptrace_attach(child)) { 560 if (ptrace_attach(child)) {
562 pt_error_return(regs, EPERM); 561 pt_error_return(regs, EPERM);
563 goto out_tsk; 562 goto out_tsk;
@@ -789,18 +788,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
789 goto out_tsk; 788 goto out_tsk;
790 } 789 }
791 790
792 case PTRACE_SUNDETACH: { /* detach a process that was attached. */
793 int err = ptrace_detach(child, data);
794 if (err) {
795 pt_error_return(regs, EIO);
796 goto out_tsk;
797 }
798 pt_succ_return(regs, 0);
799 goto out_tsk;
800 }
801
802 /* PTRACE_DUMPCORE unsupported... */
803
804 default: { 791 default: {
805 int err = ptrace_request(child, request, addr, data); 792 int err = ptrace_request(child, request, addr, data);
806 if (err) 793 if (err)
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index 2232e85c8415..e881dbbd2c49 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -766,8 +766,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
766 goto out; 766 goto out;
767 } 767 }
768 768
769 if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH) 769 if (request == PTRACE_ATTACH) {
770 || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
771 if (ptrace_attach(child)) { 770 if (ptrace_attach(child)) {
772 pt_error_return(regs, EPERM); 771 pt_error_return(regs, EPERM);
773 goto out_tsk; 772 goto out_tsk;
@@ -1137,18 +1136,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
1137 goto out_tsk; 1136 goto out_tsk;
1138 } 1137 }
1139 1138
1140 case PTRACE_SUNDETACH: { /* detach a process that was attached. */
1141 int error = ptrace_detach(child, data);
1142 if (error) {
1143 pt_error_return(regs, EIO);
1144 goto out_tsk;
1145 }
1146 pt_succ_return(regs, 0);
1147 goto out_tsk;
1148 }
1149
1150 /* PTRACE_DUMPCORE unsupported... */
1151
1152 case PTRACE_GETEVENTMSG: { 1139 case PTRACE_GETEVENTMSG: {
1153 int err; 1140 int err;
1154 1141
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h
index 714497099a42..a84345ba8bee 100644
--- a/include/asm-sparc/ptrace.h
+++ b/include/asm-sparc/ptrace.h
@@ -151,8 +151,6 @@ extern void show_regs(struct pt_regs *);
151#define SF_XXARG 0x5c 151#define SF_XXARG 0x5c
152 152
153/* Stuff for the ptrace system call */ 153/* Stuff for the ptrace system call */
154#define PTRACE_SUNATTACH 10
155#define PTRACE_SUNDETACH 11
156#define PTRACE_GETREGS 12 154#define PTRACE_GETREGS 12
157#define PTRACE_SETREGS 13 155#define PTRACE_SETREGS 13
158#define PTRACE_GETFPREGS 14 156#define PTRACE_GETFPREGS 14
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
index 7eba90c6c753..2ba989b3056e 100644
--- a/include/asm-sparc64/ptrace.h
+++ b/include/asm-sparc64/ptrace.h
@@ -261,8 +261,6 @@ extern void show_regs(struct pt_regs *);
261#define SF_XXARG 0x5c 261#define SF_XXARG 0x5c
262 262
263/* Stuff for the ptrace system call */ 263/* Stuff for the ptrace system call */
264#define PTRACE_SUNATTACH 10
265#define PTRACE_SUNDETACH 11
266#define PTRACE_GETREGS 12 264#define PTRACE_GETREGS 12
267#define PTRACE_SETREGS 13 265#define PTRACE_SETREGS 13
268#define PTRACE_GETFPREGS 14 266#define PTRACE_GETFPREGS 14