* [uml-devel] [patch 1/1] make arch/um/kernel/skas/include/skas.h include asm/types.h
@ 2004-12-10 16:45 bstroesser
2004-12-10 21:28 ` [uml-devel] " Blaisorblade
0 siblings, 1 reply; 4+ messages in thread
From: bstroesser @ 2004-12-10 16:45 UTC (permalink / raw)
To: jdike; +Cc: user-mode-linux-devel, blaisorblade_spam, bstroesser
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
make arch/um/kernel/skas/include/skas.h include asm/types.h
This is necessary to have a typedef for __u64
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
---
diff -puN arch/um/kernel/skas/include/skas.h~skas.h-include-types.h arch/um/kernel/skas/include/skas.h
--- linux-2.6.10-rc2-mm4/arch/um/kernel/skas/include/skas.h~skas.h-include-types.h 2004-12-10 15:53:03.726530054 +0100
+++ linux-2.6.10-rc2-mm4-root/arch/um/kernel/skas/include/skas.h 2004-12-10 15:53:03.730528661 +0100
@@ -7,6 +7,7 @@
#define __SKAS_H
#include "sysdep/ptrace.h"
+#include "asm/types.h"
extern int userspace_pid[];
_
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 4+ messages in thread
* [uml-devel] Re: [patch 1/1] make arch/um/kernel/skas/include/skas.h include asm/types.h
2004-12-10 16:45 [uml-devel] [patch 1/1] make arch/um/kernel/skas/include/skas.h include asm/types.h bstroesser
@ 2004-12-10 21:28 ` Blaisorblade
2004-12-13 13:00 ` Bodo Stroesser
0 siblings, 1 reply; 4+ messages in thread
From: Blaisorblade @ 2004-12-10 21:28 UTC (permalink / raw)
To: bstroesser; +Cc: jdike, user-mode-linux-devel
On Friday 10 December 2004 17:45, bstroesser@fujitsu-siemens.com wrote:
> From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
>
> make arch/um/kernel/skas/include/skas.h include asm/types.h
> This is necessary to have a typedef for __u64
*Probably* won't work, as headers in arch/um/include.... are also includable
by userspace files, which can't include <asm/types.h>; well, it could happen
to include the *host* asm/types.h, which will be bad on a x86_64 host, since
you could get a "unsigned long" (which is safe) even when compiling a 32-bit
UML!
Otherwise, there would not be includes in arch/um! They'd be in
include/asm-um!
And yes, this sucks, but is reality.
Workaround it - unsigned long long is always a correct definition.
> Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
> ---
>
>
> diff -puN arch/um/kernel/skas/include/skas.h~skas.h-include-types.h
> arch/um/kernel/skas/include/skas.h ---
> linux-2.6.10-rc2-mm4/arch/um/kernel/skas/include/skas.h~skas.h-include-type
>s.h 2004-12-10 15:53:03.726530054 +0100 +++
> linux-2.6.10-rc2-mm4-root/arch/um/kernel/skas/include/skas.h 2004-12-10
> 15:53:03.730528661 +0100 @@ -7,6 +7,7 @@
> #define __SKAS_H
>
> #include "sysdep/ptrace.h"
> +#include "asm/types.h"
>
> extern int userspace_pid[];
>
> _
--
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 4+ messages in thread
* [uml-devel] Re: [patch 1/1] make arch/um/kernel/skas/include/skas.h include asm/types.h
2004-12-10 21:28 ` [uml-devel] " Blaisorblade
@ 2004-12-13 13:00 ` Bodo Stroesser
2004-12-16 18:24 ` Blaisorblade
0 siblings, 1 reply; 4+ messages in thread
From: Bodo Stroesser @ 2004-12-13 13:00 UTC (permalink / raw)
To: Blaisorblade; +Cc: jdike, user-mode-linux-devel
Blaisorblade wrote:
> On Friday 10 December 2004 17:45, bstroesser@fujitsu-siemens.com wrote:
>
>>From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
>>
>>make arch/um/kernel/skas/include/skas.h include asm/types.h
>>This is necessary to have a typedef for __u64
>
>
> *Probably* won't work, as headers in arch/um/include.... are also includable
> by userspace files, which can't include <asm/types.h>;
My patch changes arch/um/kernel/skas/include/skas.h, which is included by
arch/um/kernel/process.c, arch/um/sys-XXXX/signal.c and some
arch/um/kernel/skas/XXXX.c. IMHO, this should be safe, or do I miss somesthing?
well, it could happen
> to include the *host* asm/types.h, which will be bad on a x86_64 host, since
> you could get a "unsigned long" (which is safe) even when compiling a 32-bit
> UML!
>
> Otherwise, there would not be includes in arch/um! They'd be in
> include/asm-um!
>
> And yes, this sucks, but is reality.
>
> Workaround it - unsigned long long is always a correct definition.
This would be another possibility, but then the definition of "void map()" in
arch/um/kernel/skas/mem_user.c also should be changed. I choosed the option,
which changes less. Feel free to choose the other one.
Bodo
>
>>Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
>>---
>>
>>
>>diff -puN arch/um/kernel/skas/include/skas.h~skas.h-include-types.h
>>arch/um/kernel/skas/include/skas.h ---
>>linux-2.6.10-rc2-mm4/arch/um/kernel/skas/include/skas.h~skas.h-include-type
>>s.h 2004-12-10 15:53:03.726530054 +0100 +++
>>linux-2.6.10-rc2-mm4-root/arch/um/kernel/skas/include/skas.h 2004-12-10
>>15:53:03.730528661 +0100 @@ -7,6 +7,7 @@
>> #define __SKAS_H
>>
>> #include "sysdep/ptrace.h"
>>+#include "asm/types.h"
>>
>> extern int userspace_pid[];
>>
>>_
>
>
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 4+ messages in thread
* [uml-devel] Re: [patch 1/1] make arch/um/kernel/skas/include/skas.h include asm/types.h
2004-12-13 13:00 ` Bodo Stroesser
@ 2004-12-16 18:24 ` Blaisorblade
0 siblings, 0 replies; 4+ messages in thread
From: Blaisorblade @ 2004-12-16 18:24 UTC (permalink / raw)
To: Bodo Stroesser; +Cc: jdike, user-mode-linux-devel
On Monday 13 December 2004 14:00, Bodo Stroesser wrote:
> Blaisorblade wrote:
> > On Friday 10 December 2004 17:45, bstroesser@fujitsu-siemens.com wrote:
> >>From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
> >>
> >>make arch/um/kernel/skas/include/skas.h include asm/types.h
> >>This is necessary to have a typedef for __u64
> >
> > *Probably* won't work, as headers in arch/um/include.... are also
> > includable by userspace files, which can't include <asm/types.h>;
>
> My patch changes arch/um/kernel/skas/include/skas.h, which is included by
> arch/um/kernel/process.c
in arch/um/kernel/Makefile, USER_OBJS lists it.
> , arch/um/sys-XXXX/signal.c
> and some
> arch/um/kernel/skas/XXXX.c. IMHO, this should be safe, or do I miss
> somesthing?
Not exactly. The reference is the USER_OBJS content for those makefiles. An
_user file is always for userspace, a _kern one for kernelspace, for others
no fixed rule from the name.
> well, it could happen
>
> > to include the *host* asm/types.h, which will be bad on a x86_64 host,
> > since you could get a "unsigned long" (which is safe) even when compiling
> > a 32-bit UML!
> >
> > Otherwise, there would not be includes in arch/um! They'd be in
> > include/asm-um!
> >
> > And yes, this sucks, but is reality.
> >
> > Workaround it - unsigned long long is always a correct definition.
>
> This would be another possibility, but then the definition of "void map()"
> in arch/um/kernel/skas/mem_user.c also should be changed.
Yes, I agree...
> I choosed the
> option, which changes less. Feel free to choose the other one.
--
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2004-12-16 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10 16:45 [uml-devel] [patch 1/1] make arch/um/kernel/skas/include/skas.h include asm/types.h bstroesser
2004-12-10 21:28 ` [uml-devel] " Blaisorblade
2004-12-13 13:00 ` Bodo Stroesser
2004-12-16 18:24 ` Blaisorblade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox