lkml.org 
[lkml]   [2000]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectAbility to manipulate fork() return values
Hi!

Fork behaves other than normal syscalls -- debugger is not called at
syscall exit. This patch fixes that. It does touch only return path
from fork(), which is "cold enough". Ability to change registers after
fork() is essential if strace wants to work correctly with clone().

[patch is against 42, but I checked it applies to 46]
Pavel

--- linux-2.3.42/arch/i386/kernel/entry.S.orig Sat Feb 5 02:07:42 2000
+++ linux-2.3.42/arch/i386/kernel/entry.S Sat Feb 5 02:09:32 2000
@@ -180,6 +180,8 @@
call SYMBOL_NAME(schedule_tail)
addl $4, %esp
GET_CURRENT(%ebx)
+ testb $0x20,flags(%ebx) # PF_TRACESYS
+ jne tracesys_exit
jmp ret_from_sys_call

/*
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

-
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:56    [W:0.650 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site