Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Tue, 18 Nov 2008
 16:20:27 -0800
Received: from dalesmta2-1.messageone.com ([129.41.169.249]) by
 mail.onstor.com with Microsoft SMTPSVC(6.0.3790.3959);	 Tue, 18 Nov 2008
 16:20:27 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 dalesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id mAJ0KPO4011646	for
 <andy.sharp@onstor.com>; Tue, 18 Nov 2008 18:20:25 -0600
Received: from localhost.localdomain ([127.0.0.1]:61580 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S23755908AbYKSATc
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Wed, 19 Nov 2008 00:19:32 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 19 Nov 2008 00:19:15
 +0000 (GMT)
Received: from mail.zeugmasystems.com ([192.139.122.66]:2612 "EHLO
	zeugmasystems.com") by ftp.linux-mips.org with ESMTP	id S23755906AbYKSATI
 convert rfc822-to-8bit (ORCPT	<rfc822;linux-mips@linux-mips.org>); Wed, 19
 Nov 2008 00:19:08 +0000
From: Anirban Sinha <ASinha@zeugmasystems.com>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Content-Class: urn:content-classes:message
Date: Tue, 18 Nov 2008 16:18:58 -0800
Subject: RE: [PATCH] ptrace syscall cleanups for mips compat archs
Thread-Topic: [PATCH] ptrace syscall cleanups for mips compat archs
Thread-Index: AclFyQZMlMwnGZlJQ4ORamqDWC1rqQEEwAhQ
Message-ID:
 <DDFD17CC94A9BD49A82147DDF7D545C50144C46B@exchange.ZeugmaSystems.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 19 Nov 2008 00:20:27.0287 (UTC)
 FILETIME=[9F692270:01C949DC]
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: o7fmgdnQcFKEAsa8VCtarg==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2008-11-19_01:2008-11-10,2008-11-18,2008-11-18 signatures=0
x-messageone-virus-scanned: Clean
x-messageone-envelope-sender: linux-mips-bounce@linux-mips.org
x-messageone-spam-details: rule=m773emszm_notspam policy=m773emszm score=0
 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam
 adjust=0 reason=mlx engine=3.1.0-0810130000 definitions=main-0811180159
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21335
x-ecartis-version: Ecartis v1.0.0
x-original-sender: ASinha@zeugmasystems.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Can someone please respond to this patch please? Even something like
"it's a total crap" would be fine!=20


Index: mips-git/arch/mips/kernel/ptrace32.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- mips-git.orig/arch/mips/kernel/ptrace32.c
+++ mips-git/arch/mips/kernel/ptrace32.c
@@ -49,19 +49,6 @@ long compat_arch_ptrace(struct task_stru
 	int ret;
=20
 	switch (request) {
-	/* when I and D space are separate, these will need to be fixed.
*/
-	case PTRACE_PEEKTEXT: /* read word at location addr. */
-	case PTRACE_PEEKDATA: {
-		unsigned int tmp;
-		int copied;
-
-		copied =3D access_process_vm(child, addr, &tmp,
sizeof(tmp), 0);
-		ret =3D -EIO;
-		if (copied !=3D sizeof(tmp))
-			break;
-		ret =3D put_user(tmp, (unsigned int __user *) (unsigned
long) data);
-		break;
-	}
=20
 	/*
 	 * Read 4 bytes of the other process' storage
@@ -208,16 +195,6 @@ long compat_arch_ptrace(struct task_stru
 		break;
 	}
=20
-	/* when I and D space are separate, this will have to be fixed.
*/
-	case PTRACE_POKETEXT: /* write the word at location addr. */
-	case PTRACE_POKEDATA:
-		ret =3D 0;
-		if (access_process_vm(child, addr, &data, sizeof(data),
1)
-		    =3D=3D sizeof(data))
-			break;
-		ret =3D -EIO;
-		break;
-
 	/*
 	 * Write 4 bytes into the other process' storage
 	 *  data is the 4 bytes that the user wants written
@@ -332,50 +309,11 @@ long compat_arch_ptrace(struct task_stru
 		ret =3D ptrace_setfpregs(child, (__u32 __user *) (__u64)
data);
 		break;
=20
-	case PTRACE_SYSCALL: /* continue and stop at next (return from)
syscall */
-	case PTRACE_CONT: { /* restart after signal. */
-		ret =3D -EIO;
-		if (!valid_signal(data))
-			break;
-		if (request =3D=3D PTRACE_SYSCALL) {
-			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
-		}
-		else {
-			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
-		}
-		child->exit_code =3D data;
-		wake_up_process(child);
-		ret =3D 0;
-		break;
-	}
-
-	/*
-	 * make the child exit.  Best I can do is send it a sigkill.
-	 * perhaps it should be put in the status that it wants to
-	 * exit.
-	 */
-	case PTRACE_KILL:
-		ret =3D 0;
-		if (child->exit_state =3D=3D EXIT_ZOMBIE)	/* already dead
*/
-			break;
-		child->exit_code =3D SIGKILL;
-		wake_up_process(child);
-		break;
-
 	case PTRACE_GET_THREAD_AREA:
 		ret =3D put_user(task_thread_info(child)->tp_value,
 				(unsigned int __user *) (unsigned long)
data);
 		break;
=20
-	case PTRACE_DETACH: /* detach a process that was attached. */
-		ret =3D ptrace_detach(child, data);
-		break;
-
-	case PTRACE_GETEVENTMSG:
-		ret =3D put_user(child->ptrace_message,
-			       (unsigned int __user *) (unsigned long)
data);
-		break;
-
 	case PTRACE_GET_THREAD_AREA_3264:
 		ret =3D put_user(task_thread_info(child)->tp_value,
 				(unsigned long __user *) (unsigned long)
data);
@@ -392,7 +330,7 @@ long compat_arch_ptrace(struct task_stru
 		break;
=20
 	default:
-		ret =3D ptrace_request(child, request, addr, data);
+		ret =3D compat_ptrace_request(child, request, addr, data);
 		break;
 	}
 out:

