summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/ptrace.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-11-27 11:05:55 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-11-27 11:06:56 +0100
commit59da21398e680e8100625d689c8bebee6a139e93 (patch)
tree7d93f87d2942dac06367af8b3a269e9f6d557b29 /arch/s390/include/asm/ptrace.h
parentMerge master.kernel.org:/home/rmk/linux-2.6-arm (diff)
downloadlinux-59da21398e680e8100625d689c8bebee6a139e93.tar.xz
linux-59da21398e680e8100625d689c8bebee6a139e93.zip
[S390] fix system call parameter functions.
syscall_get_nr() currently returns a valid result only if the call chain of the traced process includes do_syscall_trace_enter(). But collect_syscall() can be called for any sleeping task, the result of syscall_get_nr() in general is completely bogus. To make syscall_get_nr() work for any sleeping task the traps field in pt_regs is replace with svcnr - the system call number the process is executing. If svcnr == 0 the process is not on a system call path. The syscall_get_arguments and syscall_set_arguments use regs->gprs[2] for the first system call parameter. This is incorrect since gprs[2] may have been overwritten with the system call number if the call chain includes do_syscall_trace_enter. Use regs->orig_gprs2 instead. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/ptrace.h')
-rw-r--r--arch/s390/include/asm/ptrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h
index a7226f8143fb..fb0ca4796d3b 100644
--- a/arch/s390/include/asm/ptrace.h
+++ b/arch/s390/include/asm/ptrace.h
@@ -321,8 +321,8 @@ struct pt_regs
psw_t psw;
unsigned long gprs[NUM_GPRS];
unsigned long orig_gpr2;
+ unsigned short svcnr;
unsigned short ilc;
- unsigned short trap;
};
#endif