public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Jeff Dike <jdike@addtoit.com>,
	linux-kernel@vger.kernel.org,
	user-mode-linux devel 
	<user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] Re: Again: UML on s390 (31Bit)
Date: Thu, 28 Apr 2005 17:02:56 +0200	[thread overview]
Message-ID: <4270FB20.50202@fujitsu-siemens.com> (raw)
In-Reply-To: <4270E813.50706@fujitsu-siemens.com>

Bodo Stroesser wrote:
> Martin Schwidefsky wrote:
> 
>> So (!entryexit & regs->gprs[2] < 0) translates to the debugger changed 
>> the
>> guest
>> system call to something illegal on the first of the two ptrace calls. So
>> the
>> patch doesn't hurt for normal, non-ptraced operation but it might hurt
>> other
>> users of ptrace.
> 
> I don't think, it hurts. If a debugger willingly sets the syscall number
> to -1, what would happen without the patch?
> The kernel will set the result -ENOSYS into grps[2]. So, even if trap
> still indicates a syscall and a signal is pending, no syscall restarting
> will be done.
> With the patch, a debugger would observe changed behavior of the kernel
> *only*, if it writes the syscall number to -1 on the first syscall
> interception and then writes the result to ERESTARTXXXXX on the second,
> while at the same time a signal is pending for the debugged process.
> 
> I assumed, that non of the current users of ptrace exactly does this.
> If I'm wrong here, the patch *really* is bad.
Addendum:
To avoid any conflicts as far as possible, the -1 written and checked
as the syscall number to reset trap could be replaced by some magic
value, which then should defined in asm/ptrace.h
In terms of performance, any method, that allows to reset trap
without an additional ptrace call, is fine.

	Bodo

  reply	other threads:[~2005-04-28 15:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-27 20:21 Again: UML on s390 (31Bit) 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:02         ` Bodo Stroesser [this message]
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=4270FB20.50202@fujitsu-siemens.com \
    --to=bstroesser@fujitsu-siemens.com \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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