提交 190aa9f6 编写于 作者: D David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 38282764
...@@ -556,8 +556,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) ...@@ -556,8 +556,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
goto out; goto out;
} }
if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH) if (request == PTRACE_ATTACH) {
|| (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
if (ptrace_attach(child)) { if (ptrace_attach(child)) {
pt_error_return(regs, EPERM); pt_error_return(regs, EPERM);
goto out_tsk; goto out_tsk;
...@@ -789,18 +788,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs) ...@@ -789,18 +788,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
goto out_tsk; goto out_tsk;
} }
case PTRACE_SUNDETACH: { /* detach a process that was attached. */
int err = ptrace_detach(child, data);
if (err) {
pt_error_return(regs, EIO);
goto out_tsk;
}
pt_succ_return(regs, 0);
goto out_tsk;
}
/* PTRACE_DUMPCORE unsupported... */
default: { default: {
int err = ptrace_request(child, request, addr, data); int err = ptrace_request(child, request, addr, data);
if (err) if (err)
......
...@@ -766,8 +766,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) ...@@ -766,8 +766,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
goto out; goto out;
} }
if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH) if (request == PTRACE_ATTACH) {
|| (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
if (ptrace_attach(child)) { if (ptrace_attach(child)) {
pt_error_return(regs, EPERM); pt_error_return(regs, EPERM);
goto out_tsk; goto out_tsk;
...@@ -1137,18 +1136,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs) ...@@ -1137,18 +1136,6 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
goto out_tsk; goto out_tsk;
} }
case PTRACE_SUNDETACH: { /* detach a process that was attached. */
int error = ptrace_detach(child, data);
if (error) {
pt_error_return(regs, EIO);
goto out_tsk;
}
pt_succ_return(regs, 0);
goto out_tsk;
}
/* PTRACE_DUMPCORE unsupported... */
case PTRACE_GETEVENTMSG: { case PTRACE_GETEVENTMSG: {
int err; int err;
......
...@@ -151,8 +151,6 @@ extern void show_regs(struct pt_regs *); ...@@ -151,8 +151,6 @@ extern void show_regs(struct pt_regs *);
#define SF_XXARG 0x5c #define SF_XXARG 0x5c
/* Stuff for the ptrace system call */ /* Stuff for the ptrace system call */
#define PTRACE_SUNATTACH 10
#define PTRACE_SUNDETACH 11
#define PTRACE_GETREGS 12 #define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13 #define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14 #define PTRACE_GETFPREGS 14
......
...@@ -261,8 +261,6 @@ extern void show_regs(struct pt_regs *); ...@@ -261,8 +261,6 @@ extern void show_regs(struct pt_regs *);
#define SF_XXARG 0x5c #define SF_XXARG 0x5c
/* Stuff for the ptrace system call */ /* Stuff for the ptrace system call */
#define PTRACE_SUNATTACH 10
#define PTRACE_SUNDETACH 11
#define PTRACE_GETREGS 12 #define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13 #define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14 #define PTRACE_GETFPREGS 14
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册