lkml.org 
[lkml]   [2000]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Backport the 2.3.22 ptrace patch
Date
From
Would it be possible (and likely :-) to stick the 2.3.22 patch below into 
2.2.x? It removes the restriction that ptrace(POKEUSER, ...) can't modify
system call numbers.

This is needed by my user-mode port and a few other apps. It would be
convenient for users to have this already in their kernels.

Thanks, Jeff

diff -u --recursive --new-file v2.3.21/linux/arch/i386/kernel/entry.S
linux/arch/i386/kernel/entry.S
--- v2.3.21/linux/arch/i386/kernel/entry.S Sat Oct 9 11:47:50 1999
+++ linux/arch/i386/kernel/entry.S Tue Oct 12 10:05:53 1999
@@ -237,8 +237,11 @@
movl $-ENOSYS,EAX(%esp)
call SYMBOL_NAME(syscall_trace)
movl ORIG_EAX(%esp),%eax
+ cmpl $(NR_syscalls),%eax
+ jae tracesys_exit
call *SYMBOL_NAME(sys_call_table)(,%eax,4)
movl %eax,EAX(%esp) # save the return value
+tracesys_exit:
call SYMBOL_NAME(syscall_trace)
jmp ret_from_sys_call
badsys:
diff -u --recursive --new-file v2.3.21/linux/arch/i386/kernel/ptrace.c
linux/arch/i386/kernel/ptrace.c
--- v2.3.21/linux/arch/i386/kernel/ptrace.c Sun Jul 11 09:11:46 1999
+++ linux/arch/i386/kernel/ptrace.c Tue Oct 12 10:05:53 1999
@@ -71,8 +71,6 @@
unsigned long regno, unsigned long value)
{
switch (regno >> 2) {
- case ORIG_EAX:
- return -EIO;
case FS:
if (value && (value & 3) != 3)
return -EIO;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.024 / U:3.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site