Messages in this thread Patch in this message | | | Date | Wed, 1 Sep 2004 22:42:50 -0700 | From | Roland McGrath <> | Subject | [PATCH] i386 syscall tracing of bogus system calls |
| |
In 2.4, strace will show you all bogus system calls a process tries. In 2.6, it only shows you stubs < __NR_syscalls, and there is no tracing stop for large bogus system call numbers. I can't see why this was changed, so I am assuming it was accidental.
This patch restores the expected behavior that syscall tracing shows every bogus syscall attempt.
Thanks, Roland
Signed-off-by: Roland McGrath <roland@redhat.com>
Index: linux-2.6/arch/i386/kernel/entry.S =================================================================== RCS file: /home/roland/redhat/bkcvs/linux-2.5/arch/i386/kernel/entry.S,v retrieving revision 1.89 diff -p -u -r1.89 entry.S --- linux-2.6/arch/i386/kernel/entry.S 31 Aug 2004 17:35:25 -0000 1.89 +++ linux-2.6/arch/i386/kernel/entry.S 2 Sep 2004 05:38:46 -0000 @@ -255,11 +255,11 @@ sysenter_past_esp: pushl %eax SAVE_ALL GET_THREAD_INFO(%ebp) - cmpl $(nr_syscalls), %eax - jae syscall_badsys testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) jnz syscall_trace_entry + cmpl $(nr_syscalls), %eax + jae syscall_badsys call *sys_call_table(,%eax,4) movl %eax,EAX(%esp) cli @@ -278,11 +278,11 @@ ENTRY(system_call) pushl %eax # save orig_eax SAVE_ALL GET_THREAD_INFO(%ebp) - cmpl $(nr_syscalls), %eax - jae syscall_badsys # system call tracing in operation testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) jnz syscall_trace_entry + cmpl $(nr_syscalls), %eax + jae syscall_badsys syscall_call: call *sys_call_table(,%eax,4) movl %eax,EAX(%esp) # store the return value - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |