linux-um archives
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade_spam@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Bodo Stroesser <bstroesser@fujitsu-siemens.com>,
	Jeff Dike <jdike@addtoit.com>
Subject: Re: [uml-devel] [Patch 1/1] uml: fix uml-use-sysemu-for-tt.patch
Date: Sat, 13 Nov 2004 08:54:51 +0100	[thread overview]
Message-ID: <200411130854.51896.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <4194C43D.6030107@fujitsu-siemens.com>

On Friday 12 November 2004 15:10, Bodo Stroesser wrote:
> From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
>
> The patch needs some small corrections:
> 1) local_using_sysemu must be sampled *before* the next
>     ptrace(PTRACE_SYSEMU/SYSCALL) and must stay the same until do_syscall()
>     has been done. Currently it is sampled before do_syscall() and is used
>     after this for ptrace(PTRACE_SYSEMU/SYSCALL). Even if no problem is
>     visible to the UML user, a single syscall could be executed on the host
>     when switching on sysemu. The result of this then is overwritten by the
>     syscall execution in UML.

>     Since the first event the tracer has to handle is not a syscall, it's
>     enough to initialize local_using_sysemu to 0;

Sorry, what happens if the first signal it gets is a SIGTRAP, and so 
local_using_sysemu is not yet set? If this is impossible, please add a 
comment in the code for this. However, it seems that it can get to the 
SIGTRAP case with tracing == 1. When beginning the procedure, it is 0, but it 
can be changed with the value from is_tracing(task). I've not checked if that 
is zeroed on process creation (i.e. by do_fork() calling copy_thread()), but 
just note that in the code.

> 2) Even if the host never *does* a syscall in SYSEMU, we have to write the
>     syscall number with -1, to not have the host doing syscall restarting.
>     This would happen only with an invalid syscall number equal to one of
>     the -ERESTART values.

>     But to be perfect ... 

Yes, but shouldn't this be handled on the host? Restarting a syscall which has 
never been done does not seem something that SYSEMU should allow... I don't 
want anybody to need going through the code and checking that this is safe.
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-11-13  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-12 14:10 [uml-devel] [Patch 1/1] uml: fix uml-use-sysemu-for-tt.patch Bodo Stroesser
2004-11-13  7:54 ` Blaisorblade [this message]
2004-11-15 19:04   ` Bodo Stroesser
2004-11-15 20:10     ` Blaisorblade
2004-11-16  9:18       ` Bodo Stroesser
2004-11-26  2:39     ` Blaisorblade

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=200411130854.51896.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=bstroesser@fujitsu-siemens.com \
    --cc=jdike@addtoit.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