diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-11 00:11:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-11 04:59:05 -0400 |
commit | 986bef854fab44012df678a5b51817d5274d3ca1 (patch) | |
tree | 2bf27294dc501e00813507d3f070f42c6a10422c | |
parent | c07c6053c41f736711ed856aa377007078c7c396 (diff) |
sparc: Fix ptrace() detach.
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>
-rw-r--r-- | arch/sparc/kernel/ptrace.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/ptrace.c | 4 | ||||
-rw-r--r-- | include/asm-sparc/ptrace.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/ptrace.h | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 7f44ae69b29e..60dfc65549db 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -441,6 +441,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
441 | break; | 441 | break; |
442 | 442 | ||
443 | default: | 443 | default: |
444 | if (request == PTRACE_SPARC_DETACH) | ||
445 | request = PTRACE_DETACH; | ||
444 | ret = ptrace_request(child, request, addr, data); | 446 | ret = ptrace_request(child, request, addr, data); |
445 | break; | 447 | break; |
446 | } | 448 | } |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index e9fc0aa2da38..b803fe9b2c8d 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -944,6 +944,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
944 | break; | 944 | break; |
945 | 945 | ||
946 | default: | 946 | default: |
947 | if (request == PTRACE_SPARC_DETACH) | ||
948 | request = PTRACE_DETACH; | ||
947 | ret = compat_ptrace_request(child, request, addr, data); | 949 | ret = compat_ptrace_request(child, request, addr, data); |
948 | break; | 950 | break; |
949 | } | 951 | } |
@@ -1036,6 +1038,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1036 | break; | 1038 | break; |
1037 | 1039 | ||
1038 | default: | 1040 | default: |
1041 | if (request == PTRACE_SPARC_DETACH) | ||
1042 | request = PTRACE_DETACH; | ||
1039 | ret = ptrace_request(child, request, addr, data); | 1043 | ret = ptrace_request(child, request, addr, data); |
1040 | break; | 1044 | break; |
1041 | } | 1045 | } |
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h index 8201a7b29d49..c25334234a6f 100644 --- a/include/asm-sparc/ptrace.h +++ b/include/asm-sparc/ptrace.h | |||
@@ -149,6 +149,7 @@ extern void show_regs(struct pt_regs *); | |||
149 | #define SF_XXARG 0x5c | 149 | #define SF_XXARG 0x5c |
150 | 150 | ||
151 | /* Stuff for the ptrace system call */ | 151 | /* Stuff for the ptrace system call */ |
152 | #define PTRACE_SPARC_DETACH 11 | ||
152 | #define PTRACE_GETREGS 12 | 153 | #define PTRACE_GETREGS 12 |
153 | #define PTRACE_SETREGS 13 | 154 | #define PTRACE_SETREGS 13 |
154 | #define PTRACE_GETFPREGS 14 | 155 | #define PTRACE_GETFPREGS 14 |
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 714b81956f32..823656559d1a 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -298,6 +298,7 @@ extern void __show_regs(struct pt_regs *); | |||
298 | #define SF_XXARG 0x5c | 298 | #define SF_XXARG 0x5c |
299 | 299 | ||
300 | /* Stuff for the ptrace system call */ | 300 | /* Stuff for the ptrace system call */ |
301 | #define PTRACE_SPARC_DETACH 11 | ||
301 | #define PTRACE_GETREGS 12 | 302 | #define PTRACE_GETREGS 12 |
302 | #define PTRACE_SETREGS 13 | 303 | #define PTRACE_SETREGS 13 |
303 | #define PTRACE_GETFPREGS 14 | 304 | #define PTRACE_GETFPREGS 14 |