[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>
This commit is contained in:

committed by
Kyle McMartin

parent
d71624c95a
commit
a3ea84faba
@@ -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)
|
||||
|
Reference in New Issue
Block a user