Bodo Stroesser <bstroesser@xxxxxxxxxxxxxxxxxxx> wrote on 04/27/2005Thank you!
10:21:58 PM:
1) UML includes some of the subarch's (s390) headers. I had to
change one of them with the following one-liner, to make this
compile. AFAICS, this change doesn't break compilation of s390
itself.
This one isn't a problem. I'll add it to the repository.
Sorry, that's not right. At that point, gprs[2] holds the syscall number, while the
==============================================================================
--- linux-2.6.11.orig/arch/s390/kernel/ptrace.c 2005-04-04 18:57:
38.000000000 +0200
+++ linux-2.6.11/arch/s390/kernel/ptrace.c 2005-04-04 19:01:51.
000000000 +0200
@@ -726,6 +726,13 @@
? 0x80 : 0));
/*
+ * If debugger has set an invalid syscall number,
+ * we prepare to skip syscall restart handling
+ */
+ if (!entryexit && (long )regs->gprs[2] < 0 )
+ regs->trap = -1;
+
+ /*
* this isn't the same as continuing with a signal, but it will do
* for normal use. strace only continues with a signal if the
* stopping signal is not SIGTRAP. -brl
==============================================================================
This patch is not good. !entryexit indicates that you want to change the trap
indication on the first of the two calls of syscall_trace for a system call. The
second condition is gprs[2] < 0 but that can be true for a normal system call as
well, like sys_exit(-1).
It might even be true for user addresses if we reallyLet my explain a bit more. UML invalidates UML-user's syscalls on the host, processes
extent the virtual address space to full 64 bit one day (and the hardware can do
it with a 5 level paging table). To change regs->trap to -1 with the current
condition is definitly wrong.
Independent from that it do not understand why you need it at all. If the
uml host intercepted and invalidated the guest system call the system restart
indication bit _TIF_RESTART_SVC shouldn't be set because the guest didn't
execute a system call.
blue skies,
Martin
Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH