2004-09-19 11:28:39

by Blaisorblade

[permalink] [raw]
Subject: [patch 2/2] Ptrace - SYSEMU: rename PTRACE_SCEMU to PTRACE_SYSEMU, to match the guest patch.


What name do we prefer? I'm using for PTRACE_SYSEMU; if you don't agree, we
must decide and change the guest patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
---

vanilla-linux-2.6.8.1-paolo/arch/i386/kernel/entry.S | 2 +-
vanilla-linux-2.6.8.1-paolo/arch/i386/kernel/ptrace.c | 4 ++--
vanilla-linux-2.6.8.1-paolo/include/linux/ptrace.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

diff -puN include/linux/ptrace.h~rename-SCEMU-to-SYSEMU include/linux/ptrace.h
--- vanilla-linux-2.6.8.1/include/linux/ptrace.h~rename-SCEMU-to-SYSEMU 2004-09-19 12:04:48.429167656 +0200
+++ vanilla-linux-2.6.8.1-paolo/include/linux/ptrace.h 2004-09-19 12:04:48.433167048 +0200
@@ -20,7 +20,7 @@
#define PTRACE_DETACH 0x11

#define PTRACE_SYSCALL 24
-#define PTRACE_SCEMU 31
+#define PTRACE_SYSEMU 31

/* 0x4200-0x4300 are reserved for architecture-independent additions. */
#define PTRACE_SETOPTIONS 0x4200
diff -puN arch/i386/kernel/ptrace.c~rename-SCEMU-to-SYSEMU arch/i386/kernel/ptrace.c
--- vanilla-linux-2.6.8.1/arch/i386/kernel/ptrace.c~rename-SCEMU-to-SYSEMU 2004-09-19 12:04:48.430167504 +0200
+++ vanilla-linux-2.6.8.1-paolo/arch/i386/kernel/ptrace.c 2004-09-19 12:04:48.434166896 +0200
@@ -358,7 +358,7 @@ asmlinkage int sys_ptrace(long request,
}
break;

- case PTRACE_SCEMU: /* continue and replace next syscall */
+ case PTRACE_SYSEMU: /* continue and replace next syscall */
case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
case PTRACE_CONT: { /* restart after signal. */
long tmp;
@@ -366,7 +366,7 @@ asmlinkage int sys_ptrace(long request,
ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
- if (request == PTRACE_SCEMU) {
+ if (request == PTRACE_SYSEMU) {
set_tsk_thread_flag(child, TIF_SYSCALL_EMU);
}
else {
diff -puN arch/i386/kernel/entry.S~rename-SCEMU-to-SYSEMU arch/i386/kernel/entry.S
--- vanilla-linux-2.6.8.1/arch/i386/kernel/entry.S~rename-SCEMU-to-SYSEMU 2004-09-19 12:04:48.431167352 +0200
+++ vanilla-linux-2.6.8.1-paolo/arch/i386/kernel/entry.S 2004-09-19 12:04:48.434166896 +0200
@@ -341,7 +341,7 @@ syscall_trace_entry:
xorl %edx,%edx
call do_syscall_trace
cmpl $0, %eax
- jne syscall_exit # ret != 0 -> running under PTRACE_SCEMU,
+ jne syscall_exit # ret != 0 -> running under PTRACE_SYSEMU,
# so must skip actual syscall
movl ORIG_EAX(%esp), %eax
cmpl $(nr_syscalls), %eax
_