summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/ptrace.c
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2006-06-16 19:10:02 +0000
committerKyle McMartin <kyle@hera.kernel.org>2006-06-27 23:28:40 +0000
commita3ea84fabacd9cc5bcc3fda67c35e692ca10dc8c (patch)
tree4de45b002abf5873fc5b19b90f2637e97b663899 /arch/parisc/kernel/ptrace.c
parentd71624c95a231873ec3727ee9bff7b68e692de70 (diff)
downloadop-kernel-dev-a3ea84fabacd9cc5bcc3fda67c35e692ca10dc8c.zip
op-kernel-dev-a3ea84fabacd9cc5bcc3fda67c35e692ca10dc8c.tar.gz
[PARISC] Add is_compat_task() helper
... And convert signal.c and ptrace.c to use it instead of open coded equivalents. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc/kernel/ptrace.c')
-rw-r--r--arch/parisc/kernel/ptrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 413292f..3f28de9 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -91,7 +91,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
int copied;
#ifdef __LP64__
- if (personality(child->personality) == PER_LINUX32) {
+ if (__is_compat_task(child)) {
unsigned int tmp;
addr &= 0xffffffffL;
@@ -123,7 +123,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_POKEDATA:
ret = 0;
#ifdef __LP64__
- if (personality(child->personality) == PER_LINUX32) {
+ if (__is_compat_task(child)) {
unsigned int tmp = (unsigned int)data;
DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
request == PTRACE_POKETEXT ? "TEXT" : "DATA",
@@ -146,7 +146,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_PEEKUSR: {
ret = -EIO;
#ifdef __LP64__
- if (personality(child->personality) == PER_LINUX32) {
+ if (__is_compat_task(child)) {
unsigned int tmp;
if (addr & (sizeof(int)-1))
@@ -205,7 +205,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
goto out_tsk;
}
#ifdef __LP64__
- if (personality(child->personality) == PER_LINUX32) {
+ if (__is_compat_task(child)) {
if (addr & (sizeof(int)-1))
goto out_tsk;
if ((addr = translate_usr_offset(addr)) < 0)
OpenPOWER on IntegriCloud