Resent-Date: Mon, 4 Oct 1999 15:54:13 +0200 (MET DST)
Sender: labr@ubi.se
Date: Mon, 04 Oct 1999 15:54:03 +0200
From: lars brinkhoff <lars.brinkhoff@intermec.com>
X-Accept-Language: en
To: linux-m68k@lists.linux-m68k.org
Subject: PATCH: enable system call number change
Resent-From: linux-m68k@phil.uni-sb.de

With the patch below, a parent process can change the system
call numbers of a child using ptrace().  This functionality
is already part of Linux/i386.

--- linux-2.3.16/arch/m68k/kernel/entry.S.orig	Mon Oct  4 15:33:19 1999
+++ linux-2.3.16/arch/m68k/kernel/entry.S	Mon Oct  4 15:39:26 1999
@@ -93,6 +93,7 @@
 	jbsr	SYMBOL_NAME(syscall_trace)
 	RESTORE_SWITCH_STACK
 	addql	#4,%sp
+	movel	%sp@(PT_ORIG_D0),%d2
 	jbsr	@(SYMBOL_NAME(sys_call_table),%d2:l:4)@(0)
 	movel	%d0,%sp@(PT_D0)		| save the return value
 	subql	#4,%sp			| dummy return address

