All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [PATCH] provide asm/ldt.h
@ 2003-12-03  1:04 Steve Bennett
  2003-12-06  0:05 ` Jeff Dike
  0 siblings, 1 reply; 10+ messages in thread
From: Steve Bennett @ 2003-12-03  1:04 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

The attached trivial patch provides access to <asm/ldt.h> when compiling
against UML.
I required this when compiling strace.

-- 
Steve Bennett                 http://www.SnapGear.com/
steveb@snapgear.com           Custom Embedded Solutions + Security

[-- Attachment #2: uml-strace-ldt.patch --]
[-- Type: text/plain, Size: 198 bytes --]

diff  -u linux-2.4.x/include/asm-um/ldt.h
--- linux-2.4.x/include/asm-um/ldt.h.orig
+++ linux-2.4.x/include/asm-um/ldt.h	2003-12-02 16:17:23.000000000 +1000
@@ -0,0 +1 @@
+#include <asm/arch/ldt.h>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-03  1:04 [uml-devel] [PATCH] provide asm/ldt.h Steve Bennett
@ 2003-12-06  0:05 ` Jeff Dike
  2003-12-06  9:45   ` Henrik Nordstrom
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Dike @ 2003-12-06  0:05 UTC (permalink / raw)
  To: Steve Bennett; +Cc: user-mode-linux-devel

steveb@snapgear.com said:
> The attached trivial patch provides access to <asm/ldt.h> when
> compiling against UML. 

I.e. you're compiling on a system that has /usr/include/asm linked to 
/usr/include/asm-um?

I don't think that's a great idea.  UML pretends to be the same arch as the 
host to userspace, so you should be compiling against the host's headers.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-06  0:05 ` Jeff Dike
@ 2003-12-06  9:45   ` Henrik Nordstrom
  2003-12-08 19:21     ` Jeff Dike
  0 siblings, 1 reply; 10+ messages in thread
From: Henrik Nordstrom @ 2003-12-06  9:45 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Steve Bennett, user-mode-linux-devel

On Fri, 5 Dec 2003, Jeff Dike wrote:

> I don't think that's a great idea.  UML pretends to be the same arch as the 
> host to userspace, so you should be compiling against the host's headers.

Which is a bit troublesome on self-hosted UML systems of when building 
kernel configuration dependent programs.

Regards
Henrik



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-06  9:45   ` Henrik Nordstrom
@ 2003-12-08 19:21     ` Jeff Dike
  2003-12-08 21:29       ` Henrik Nordstrom
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Dike @ 2003-12-08 19:21 UTC (permalink / raw)
  To: Henrik Nordstrom; +Cc: Steve Bennett, user-mode-linux-devel

hno@marasystems.com said:
> Which is a bit troublesome on self-hosted UML systems of when building
>  kernel configuration dependent programs. 

Do you have any specific examples?

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-08 19:21     ` Jeff Dike
@ 2003-12-08 21:29       ` Henrik Nordstrom
  2003-12-08 23:38         ` Jeff Dike
  0 siblings, 1 reply; 10+ messages in thread
From: Henrik Nordstrom @ 2003-12-08 21:29 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Steve Bennett, user-mode-linux-devel

On Mon, 8 Dec 2003, Jeff Dike wrote:

> hno@marasystems.com said:
> > Which is a bit troublesome on self-hosted UML systems of when building
> >  kernel configuration dependent programs. 
> 
> Do you have any specific examples?

Consider a hosted system where the user is allowed to build his own UML 
kernel. With this there is various kernel-dependent programs such as 
iptables, strace etc which needs to be built.

It is obviously possible the user is made aware of the quirks of the UML 
kernel tree compared to the other architectures, instructing him to 
configure the kernel source using the host arch when building these tools, 
but should he be required to?

Luckily so I do not have this problem with any of the kernel dependent
software we use, but mainly because uml is not our main architecture so
our build process always builds primarily for the host, and also always
builds temporary kernel source trees matching the exact kernel version
when building kernel-dependent binaries, but I see the situation quite 
different in a UML hosting situation where UML is the primary architecture 
seen by the users.

Regards
Henrik



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-08 21:29       ` Henrik Nordstrom
@ 2003-12-08 23:38         ` Jeff Dike
  2003-12-09  0:07           ` Henrik Nordstrom
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Dike @ 2003-12-08 23:38 UTC (permalink / raw)
  To: Henrik Nordstrom; +Cc: Steve Bennett, user-mode-linux-devel

hno@marasystems.com said:
> With this there is various kernel-dependent programs such as
> iptables, strace etc which needs to be built.

How are these kernel-dependent (in the sense that they have to be built against
a UML /usr/include/asm or they won't work under UML)?

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-08 23:38         ` Jeff Dike
@ 2003-12-09  0:07           ` Henrik Nordstrom
  2003-12-09 19:01             ` Adam Heath
  0 siblings, 1 reply; 10+ messages in thread
From: Henrik Nordstrom @ 2003-12-09  0:07 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Steve Bennett, user-mode-linux-devel

On Mon, 8 Dec 2003, Jeff Dike wrote:

> How are these kernel-dependent (in the sense that they have to be built against
> a UML /usr/include/asm or they won't work under UML)?

They are kernel dependent in that they need to be build to a
/usr/src/linux/include tree matching the kernel used. The "kernel"  
headers in /usr/include/ should not be used when compiling kernel
dependent applications, those are just there from historic reasons to make
glibc happy.

It is true that in all cases I know of building the tools to a kernel tree
configured for the host arch with the same kernel configuration options as
the UML kernel will work and this is how we build our tools, but for some
this might be quite some hassle to set up. Luckily most tools build fine 
to the UML headers.

Regards
Henrik



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-09  0:07           ` Henrik Nordstrom
@ 2003-12-09 19:01             ` Adam Heath
  2003-12-09 20:03               ` Henrik Nordstrom
  2003-12-09 20:14               ` Jeff Dike
  0 siblings, 2 replies; 10+ messages in thread
From: Adam Heath @ 2003-12-09 19:01 UTC (permalink / raw)
  To: Henrik Nordstrom; +Cc: Jeff Dike, Steve Bennett, user-mode-linux-devel

On Tue, 9 Dec 2003, Henrik Nordstrom wrote:

> On Mon, 8 Dec 2003, Jeff Dike wrote:
>
> > How are these kernel-dependent (in the sense that they have to be built against
> > a UML /usr/include/asm or they won't work under UML)?
>
> They are kernel dependent in that they need to be build to a
> /usr/src/linux/include tree matching the kernel used. The "kernel"
> headers in /usr/include/ should not be used when compiling kernel
> dependent applications, those are just there from historic reasons to make
> glibc happy.

This is not correct.

The user-side of UML should not care about the kernel version *at all*.  It
should only be concerned with the posix interface defined by the host
compiling environment, and the arch interface defined by UML.

In *all* cases where UML's userspace is including kernel headers(directly or
indirectly), the userspace is wrong, and *must* be fixed.  This means changing
the UML arch interface to hide these internal kernel apis.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-09 19:01             ` Adam Heath
@ 2003-12-09 20:03               ` Henrik Nordstrom
  2003-12-09 20:14               ` Jeff Dike
  1 sibling, 0 replies; 10+ messages in thread
From: Henrik Nordstrom @ 2003-12-09 20:03 UTC (permalink / raw)
  To: Adam Heath; +Cc: Jeff Dike, Steve Bennett, user-mode-linux-devel

On Tue, 9 Dec 2003, Adam Heath wrote:

> This is not correct.
> 
> The user-side of UML should not care about the kernel version *at all*.  It
> should only be concerned with the posix interface defined by the host
> compiling environment, and the arch interface defined by UML.

We are talkning about userspace applications which are in different ways
dependent on the kernel they run against. This includes but not limited to

  * iptables
  * strace
  * modutils

and how these should be build when using a UML kernel.

We are NOT talking about the UML kernel sources as such.

Regards
Henrik




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [uml-devel] [PATCH] provide asm/ldt.h
  2003-12-09 19:01             ` Adam Heath
  2003-12-09 20:03               ` Henrik Nordstrom
@ 2003-12-09 20:14               ` Jeff Dike
  1 sibling, 0 replies; 10+ messages in thread
From: Jeff Dike @ 2003-12-09 20:14 UTC (permalink / raw)
  To: Adam Heath; +Cc: Henrik Nordstrom, Steve Bennett, user-mode-linux-devel

adam@doogie.org said:
> The user-side of UML should not care about the kernel version *at
> all*.  It should only be concerned with the posix interface defined by
> the host compiling environment, and the arch interface defined by UML.

Ummm, you should perhaps read the thread before responding to it.  We are
talking about compiling userspace stuff inside UML against the UML 
/usr/include/asm.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-12-09 20:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-03  1:04 [uml-devel] [PATCH] provide asm/ldt.h Steve Bennett
2003-12-06  0:05 ` Jeff Dike
2003-12-06  9:45   ` Henrik Nordstrom
2003-12-08 19:21     ` Jeff Dike
2003-12-08 21:29       ` Henrik Nordstrom
2003-12-08 23:38         ` Jeff Dike
2003-12-09  0:07           ` Henrik Nordstrom
2003-12-09 19:01             ` Adam Heath
2003-12-09 20:03               ` Henrik Nordstrom
2003-12-09 20:14               ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.