]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sparc: Fix ptrace() detach.
authorDavid S. Miller <davem@davemloft.net>
Sun, 11 May 2008 04:11:23 +0000 (21:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 May 2008 08:59:05 +0000 (01:59 -0700)
Forever we had a PTRACE_SUNOS_DETACH which was unconditionally
recognized, regardless of the personality of the process.

Unfortunately, this value is what ended up in the GLIBC sys/ptrace.h
header file on sparc as PTRACE_DETACH and PT_DETACH.

So continue to recognize this old value.  Luckily, it doesn't conflict
with anything we actually care about.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/ptrace.c
arch/sparc64/kernel/ptrace.c
include/asm-sparc/ptrace.h
include/asm-sparc64/ptrace.h

index 7f44ae69b29e52dd2ae7ff0a647d7ace053211fc..60dfc65549db26d454ac470b89731567808516e9 100644 (file)
@@ -441,6 +441,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
 
        default:
+               if (request == PTRACE_SPARC_DETACH)
+                       request = PTRACE_DETACH;
                ret = ptrace_request(child, request, addr, data);
                break;
        }
index e9fc0aa2da386e8161a7a4badedb8f77b8ce7789..b803fe9b2c8d72cdba54688a9e83c852c915fc4a 100644 (file)
@@ -944,6 +944,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                break;
 
        default:
+               if (request == PTRACE_SPARC_DETACH)
+                       request = PTRACE_DETACH;
                ret = compat_ptrace_request(child, request, addr, data);
                break;
        }
@@ -1036,6 +1038,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
 
        default:
+               if (request == PTRACE_SPARC_DETACH)
+                       request = PTRACE_DETACH;
                ret = ptrace_request(child, request, addr, data);
                break;
        }
index 8201a7b29d49bdc7052793b4ccac9b75fb5b8b73..c25334234a6ff8c4f09f78ab5f2661478c1526c8 100644 (file)
@@ -149,6 +149,7 @@ extern void show_regs(struct pt_regs *);
 #define SF_XXARG  0x5c
 
 /* Stuff for the ptrace system call */
+#define PTRACE_SPARC_DETACH       11
 #define PTRACE_GETREGS            12
 #define PTRACE_SETREGS            13
 #define PTRACE_GETFPREGS          14
index 714b81956f32a653a4c9863edbbc2aefb16b89a8..823656559d1adddd00fda91a0079992c3aff2609 100644 (file)
@@ -298,6 +298,7 @@ extern void __show_regs(struct pt_regs *);
 #define SF_XXARG  0x5c
 
 /* Stuff for the ptrace system call */
+#define PTRACE_SPARC_DETACH       11
 #define PTRACE_GETREGS            12
 #define PTRACE_SETREGS            13
 #define PTRACE_GETFPREGS          14