provide asm/ldt.h
PATCH 1/1 provide asm/ldt.h
The attached trivial patch provides access to <asm/ldt.h> when compiling against UML.
I required this when compiling strace.
Signature · 2 lines
Steve Bennett http://www.SnapGear.com/ [email protected] Custom Embedded Solutions + Security
include/asm-um/ldt.h renamed from include/asm-um/ldt.h.orig +1 -0
@@ -0,0 +1 @@ +#include <asm/arch/ldt.h>
Quoted 2 lines · [email protected] 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Jeff Dike
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · [email protected] 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 5 lines · Jeff Dike
Quoted 2 lines · [email protected] 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · [email protected] 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Jeff Dike
How are these kernel-dependent (in the sense that they have to be built against a UML
/usr/include/asmor 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 10 lines · Henrik Nordstrom
Quoted 2 lines · Jeff Dike
How are these kernel-dependent (in the sense that they have to be built against a UML
/usr/include/asmor they won't work under UML)?They are kernel dependent in that they need to be build to a
/usr/src/linux/includetree 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 3 lines · [email protected] 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 5 lines · Adam Heath
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel