From: Blaisorblade <blaisorblade@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] Re: UML-patches to prepare UML/s390
Date: Wed, 6 Apr 2005 21:50:36 +0200 [thread overview]
Message-ID: <200504062150.36496.blaisorblade@yahoo.it> (raw)
In-Reply-To: <425437F0.70804@fujitsu-siemens.com>
On Wednesday 06 April 2005 21:26, Bodo Stroesser wrote:
> Blaisorblade wrote:
> > On Wednesday 06 April 2005 20:57, Bodo Stroesser wrote:
> >>Jeff Dike wrote:
> >>>On Wed, Apr 06, 2005 at 03:27:50PM +0200, Bodo Stroesser wrote:
> >>>>Here are the patches (tarball attached), that I've applied to
> >>>>UML 2.6.11 + incrementals, before adding s390-files.
> >>>>These patches are tested a bit on x86, but not on x86_64.
> >>>
> >>>I merged these, except for the restartnointr one because I don't have
> >>>ERESTARTNOINTR in my /usr/include, inside a #ifdef KERNEL or not.
> >>>
> >>> Jeff
> >>
> >>That's bad. Do you have any suggestions how to solve this?
> >
> > Add it to the compilation-generated header files (the output of
> > mk_constants, mk_thread and such), so we catch it from the definition
> > given by ourselves and expose to the whole of UML.
>
> Yeah, tx, that would be possible.
> But the reason for using /usr/include/linux/errno.h was to have the host's
> definition, not the one from guest.
> Currently they are the same for 2.4 and 2.6, but worst case that might
> change in future versions.
Yes maybe in principle, however the errno values are part of the ABI.
> Only debugger could note this, as ERESTART_XXXX
> is unvisible to user programs.
Well, the debugger is a user program, so even this one, which is almost
internal, is part of the ABI. Actually, you might ask on LKML if you want.
> So, when implementing your idea, maybe I should add a further test, that
> our ERESTARTNOINTR *does* trigger a syscall restart on the host.
Well, maybe adding a runtime test is worth, however let's start by fixing it
compile-time as I say below. I don't know if adding a test now is "excessive
planification and over-coding", but I feel like this (especially even for the
above ABI reasons).
A simpler idea:
get our value as I said
get the host value if defined (it's a macro so no problem)
#ifdef HOST_ERESTARTNOINTR
#define ERESTARTNOINTR HOST_ERESTARTNOINTR
#else
#define ERESTARTNOINTR KERN_ERESTARTNOINTR
#endif
Or, actually:
#ifndef ERESTARTNOINTR
#define ERESTARTNOINTR KERN_ERESTARTNOINTR
#endif
Btw, we currently solved this for PTRACE_SYSEMU, SETOPTIONS and many similar
things by copying the value we provide. It wouldn't be bad, when applicable
(not PTRACE_SYSEMU since mainline hasn't the SYSEMU patch), to use the above
construct (i.e. taking the fallback value from the kernel instead of
specifying it and copying it - they aren't supposed to change, but anyway).
However, I'll have to merge the refactoring of the userspace programs sooner
or later. Don't let this stop you, anyway.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-04-06 19:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-06 13:27 [uml-devel] UML-patches to prepare UML/s390 Bodo Stroesser
2005-04-06 20:35 ` [uml-devel] " Jeff Dike
2005-04-06 18:57 ` Bodo Stroesser
2005-04-06 19:17 ` Blaisorblade
2005-04-06 19:26 ` Bodo Stroesser
2005-04-06 19:50 ` Blaisorblade [this message]
2005-04-07 9:54 ` Bodo Stroesser
2005-04-06 18:59 ` Bodo Stroesser
2005-04-06 19:16 ` Bastian Blank
2005-04-06 19:28 ` Blaisorblade
2005-04-06 19:33 ` Bodo Stroesser
2005-04-06 20:02 ` Bastian Blank
2005-04-06 20:10 ` Blaisorblade
2005-04-07 9:39 ` Bodo Stroesser
2005-04-07 15:57 ` Bodo Stroesser
2005-04-08 1:22 ` [uml-devel] " Blaisorblade
[not found] ` <42562EC4.7040903@fujitsu-siemens.com>
2005-04-17 17:37 ` Blaisorblade
2005-04-18 10:54 ` Bodo Stroesser
2005-04-19 16:45 ` Blaisorblade
2005-04-26 11:31 ` Bodo Stroesser
2005-04-29 20:50 ` Blaisorblade
2005-04-22 1:32 ` [uml-devel] " Jeff Dike
2005-04-24 14:44 ` Blaisorblade
2005-04-24 16:51 ` Jeff Dike
2005-04-24 18:44 ` 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=200504062150.36496.blaisorblade@yahoo.it \
--to=blaisorblade@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