From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>,
linux-kernel@vger.kernel.org,
user-mode-linux devel
<user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: Again: UML on s390 (31Bit)
Date: Fri, 29 Apr 2005 14:47:51 +0200 [thread overview]
Message-ID: <42722CF7.4000005@fujitsu-siemens.com> (raw)
In-Reply-To: <OFC64AA10F.5C318C60-ONC1256FF2.003E8736-C1256FF2.0040BFA0@de.ibm.com>
Martin Schwidefsky wrote:
> Yes, it is not a really good idea to add something to struct user. That will
> affect the dump format and debugging tools. So it would be an additional ptrace
> command like PTRACE_SETTRAP/PTRACE_GETTRAP. The only other solution I can think
> of is to be more specific about what the debugger can indicate to the debuggee
> what needs to be done after the first syscall_trace invocation. At the moment
> it is either
> 1) a valid system call number, execute the new syscall, or
> 2) an invalid system call number, skip the system call but don't change
> regs->traps and do system call restarting if another signal is pending
> If we use more specific error codes instead of just any invalid syscall number
> we could have e.g. this:
> 1) a vaild system call number, execute the new syscall,
> 2) -Exxx, skip the system call, store -1 to regs->trap and then continue
> with restarting system calls if another system call is pending.
Typo with<->without?
Yes. That's what I suggested as a "special magic number". Only if that magic
is written as syscall number at the first interception, syscall_trace() would
modify regs->trap to -1.
Currently my patch uses -1 as the magic number, but there might be better
choices.
> 3) -Eyyy, skip the system call but leave regs->trap intact so that a pending
> signal will restart the system call.
Not only -Eyyy, but all values unequal to "special magic number" could leave
regs->trap intact.
>
> But we really have to be very careful not to break either strace or gdb if
> we do this change. Probably it is much easier to introduce PTRACE_SET/GET_TRAP.
It's easier for s390-kernel, but from UML's point of view, the magic number
solution would be better.
Anyway, if you decide not to allow the magic number, we have to find a way
to use PTRACE_SETTRAP in UML without having to call it too often (Performance).
Because of UML's splitting in kernel-obj and user-obj, this might be a bit
tricky.
BTW: I see no reason to implement PTRACE_GETTRAP, as
PTRACE_SETOPTIONS/PTRACE_TRACESYSGOOD give us a way to distinguish between
syscall interceptions and other SIGTRAPs.
Regards, Bodo
next prev parent reply other threads:[~2005-04-29 12:48 UTC|newest]
Thread overview: 24+ 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 ` [uml-devel] " 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 [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-05-04 21:33 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
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=42722CF7.4000005@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