From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: Again: UML on s390 (31Bit)
Date: Wed, 01 Jun 2005 12:50:30 +0200 [thread overview]
Message-ID: <429D92F6.90906@fujitsu-siemens.com> (raw)
In-Reply-To: <OFB257B050.D41F8BE1-ON41257012.005BE91F-41257012.005D25B2@de.ibm.com>
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
>
next prev parent reply other threads:[~2005-06-01 10:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-04 21:33 Again: UML on s390 (31Bit) Ulrich Weigand
2005-05-06 13:04 ` Bodo Stroesser
2005-05-13 15:07 ` Bodo Stroesser
2005-05-13 15:26 ` Martin Schwidefsky
2005-05-13 15:37 ` Bodo Stroesser
2005-05-13 15:40 ` Martin Schwidefsky
2005-05-13 15:45 ` Bodo Stroesser
2005-05-13 15:50 ` Martin Schwidefsky
2005-05-13 16:06 ` Bodo Stroesser
2005-05-20 10:09 ` Bodo Stroesser
2005-05-31 16:57 ` Martin Schwidefsky
2005-06-01 10:50 ` Bodo Stroesser [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-05-04 16:04 Martin Schwidefsky
2005-05-04 19:02 ` Bodo Stroesser
2005-04-27 20:21 Bodo Stroesser
2005-04-28 8:36 ` Martin Schwidefsky
2005-04-28 9:54 ` Bodo Stroesser
2005-04-28 13:03 ` Martin Schwidefsky
2005-04-28 13:41 ` Bodo Stroesser
2005-04-28 15:27 ` Martin Schwidefsky
2005-04-28 18:50 ` Bodo Stroesser
2005-04-29 11:47 ` Martin Schwidefsky
2005-04-29 12:47 ` Bodo Stroesser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=429D92F6.90906@fujitsu-siemens.com \
--to=bstroesser@fujitsu-siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox