lkml.org 
[lkml]   [2005]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Again: UML on s390 (31Bit)
Thank You!
That's what we need.

Bodo


Martin Schwidefsky wrote:
>>>I've prepared and attached a small program that easily can reproduce
>>>the problem. I hope this will help to find a viable solution.
>>
>>Here is a slightly modified version of my testtool. The new version
>>covers the fact, that in certain situations UML must avoid syscall
>>restarting, even if PSWADDR is not modified.
>
>
> Ok, Uli convinced me that the original patch to clear regs->traps if
> the system call has been canceled on the first call to syscall_trace
> is the correct thing to do. If the tracer chooses to invalidate the
> system call of the traced process then the complete handling of the
> function executed for the system call is done in the tracer. That
> includes system call restarting in the case that another system call
> is involved to implement the function. The point is that the traced
> process did not execute a system call, ergo no system call restarting
> may take place.
> So after a long discussion I'll just use a slightly modified version
> of the original patch:
>
> Index: ptrace.c
> ===================================================================
> RCS file: /home/cvs/linux-2.5/arch/s390/kernel/ptrace.c,v
> retrieving revision 1.35
> diff -u -r1.35 ptrace.c
> --- ptrace.c 6 May 2005 18:59:13 -0000 1.35
> +++ ptrace.c 31 May 2005 16:50:50 -0000
> @@ -39,6 +39,7 @@
> #include <asm/pgalloc.h>
> #include <asm/system.h>
> #include <asm/uaccess.h>
> +#include <asm/unistd.h>
>
> #ifdef CONFIG_S390_SUPPORT
> #include "compat_ptrace.h"
> @@ -762,6 +763,13 @@
> return;
> ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
> ? 0x80 : 0));
> +
> + /*
> + * If the debuffer has set an invalid system call number,
> + * we prepare to skip the system call restart handling.
> + */
> + if (!entryexit && regs->gprs[2] >= NR_syscalls)
> + regs->trap = -1;
>
> /*
> * this isn't the same as continuing with a signal, but it will do
>
> ===================================================================
>
> regs->trap should be reset for any invalid system call, not just for
> negative system call numbers.
>
> blue skies,
> Martin
>
> Martin Schwidefsky
> Linux for zSeries Development & Services
> IBM Deutschland Entwicklung GmbH
>
-
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/

\
 
 \ /
  Last update: 2005-06-01 12:55    [W:2.625 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site