Skip to contentSkip to conversation

PATCH [00/03]: allow building of UML with skas headers installed via `make headers_install'

uml-devel Nix 2 participants 4 messages Nov 26, 2006 – Dec 7, 2006 User-mode Linux (UML)

lore
Share & tools
lore

Nix

author
#0 lore raw

I recently upgraded my glibc to 2.5, and upgraded the userspace headers at the same time. As a result, I've had several problems with UML.

One of these Jeff has seen reported and fixed, although the correct cause was not described (the #inclusion of <linux/stddef.h> instead of <stddef.h> in user-offsets.c).

However, other problems are so-far undescribed. There's one trivial one (fixed in patch 3 in this series, should be uncontroversial).

And then there's this:

CC arch/um/os-Linux/process.o
In file included from arch/um/include/skas_ptrace.h:12,

                 from arch/um/os-Linux/process.c:23:

arch/um/include/sysdep/skas_ptrace.h:9: error: redefinition of struct ptrace_faultinfo' arch/um/include/sysdep/skas_ptrace.h:14: error: redefinition of struct ptrace_ldt'

The problem is that I installed my host kernel's headers, and that kernel has the skas patch installed, so the skas ptrace structures are already defined in <asm/ptrace.h>. Thankfully it's guarded by a #define that we can test, but even so we need to split that SKAS section out into a new header. (diff attached, not gitted since the SKAS part isn't maintained in git anyway.)

So the following patches are a terribly provisional way to fix this:
it works but it may not maintain the separation between skas and mainline that you want. At least it points up the existence of the problems.

There are two patches in this series: one which splits the skas part of ptrace.h into its own header, so that UML can use it, and one that uses that header instead of skas_ptrace.h.

(All diffs against 2.6.18.x: I can respin against 2.6.19-pre if you want, but, again, this area changes little so I'd expect things to apply reasonably well anyway.)

Signature · 12 lines
`The main high-level difference between Emacs and (say) UNIX, Windows,
 or BeOS... is that Emacs boots quicker.' --- PdS

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#1 lore raw
Quoted 9 lines · Nix

I recently upgraded my glibc to 2.5, and upgraded the userspace headers at the same time. As a result, I've had several problems with UML.

One of these Jeff has seen reported and fixed, although the correct cause was not described (the #inclusion of <linux/stddef.h> instead of <stddef.h> in user-offsets.c).

However, other problems are so-far undescribed. There's one trivial one (fixed in patch 3 in this series, should be uncontroversial).

Agreed.

Quoted 16 lines

And then there's this:

CC arch/um/os-Linux/process.o
In file included from arch/um/include/skas_ptrace.h:12,

                 from arch/um/os-Linux/process.c:23:

arch/um/include/sysdep/skas_ptrace.h:9: error: redefinition of `struct ptrace_faultinfo' arch/um/include/sysdep/skas_ptrace.h:14: error:
redefinition of `struct ptrace_ldt'

The problem is that I installed my host kernel's headers, and that kernel has the skas patch installed, so the skas ptrace structures are already defined in <asm/ptrace.h>. Thankfully it's guarded by a #define that we can test, but even so we need to split that SKAS section out into a new header. (diff attached, not gitted since the SKAS part isn't maintained in git anyway.)

Quoted 3 lines

So the following patches are a terribly provisional way to fix this:
it works but it may not maintain the separation between skas and mainline that you want.

You maybe refer to the problem that without SKAS in host headers the resulting UML tree does not compile? Yes, it is a problem. You are trying to remove all duplications, and probably you should avoid them. Define a macro to test with a more reasonable name (say __UML_SKAS_SUPPORT ...).

Quoted 10 lines

At least it points up the existence of the
problems.

There are two patches in this series: one which splits the skas part of ptrace.h into its own header, so that UML can use it, and one that uses that header instead of skas_ptrace.h.

(All diffs against 2.6.18.x: I can respin against 2.6.19-pre if you want, but, again, this area changes little so I'd expect things to apply reasonably well anyway.)

Signature · 17 lines
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
author
#2 lore raw

On 29 Nov 2006, [email protected] verbalised:

Quoted 4 lines · Nix
Quoted 2 lines

However, other problems are so-far undescribed. There's one trivial one (fixed in patch 3 in this series, should be uncontroversial).

Agreed.

Oh good, that's the only one I was confident of.

Quoted 16 lines
Quoted 15 lines

And then there's this:

CC arch/um/os-Linux/process.o
In file included from arch/um/include/skas_ptrace.h:12,

                 from arch/um/os-Linux/process.c:23:

arch/um/include/sysdep/skas_ptrace.h:9: error: redefinition of `struct ptrace_faultinfo' arch/um/include/sysdep/skas_ptrace.h:14: error:
redefinition of `struct ptrace_ldt'

The problem is that I installed my host kernel's headers, and that kernel has the skas patch installed, so the skas ptrace structures are already defined in <asm/ptrace.h>. Thankfully it's guarded by a #define that we can test, but even so we need to split that SKAS section out into a new header. (diff attached, not gitted since the SKAS part isn't maintained in git anyway.)

Quoted 6 lines
Quoted 3 lines

So the following patches are a terribly provisional way to fix this:
it works but it may not maintain the separation between skas and mainline that you want.

You maybe refer to the problem that without SKAS in host headers the resulting UML tree does not compile?

I *have* SKAS in the host headers. That's the problem (and it arguably shouldn't be).

Quoted 3 lines

Yes, it is a problem. You are trying to remove all
duplications, and probably you should avoid them. Define a macro to test with a more reasonable name (say __UML_SKAS_SUPPORT ...).

OK, will do. I just thought that cutting the skas-ptrace stuff into its own header, rather than duplicating pieces of it between arch/ and include/um/, seemed more immediately reasonable.

Signature · 12 lines
`The main high-level difference between Emacs and (say) UNIX, Windows,
 or BeOS... is that Emacs boots quicker.' --- PdS

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#3 lore raw
Quoted 29 lines · Nix

On 29 Nov 2006, [email protected] verbalised:

Quoted 5 lines · Nix
Quoted 2 lines

However, other problems are so-far undescribed. There's one trivial one (fixed in patch 3 in this series, should be uncontroversial).

Agreed.

Oh good, that's the only one I was confident of.

Quoted 20 lines
Quoted 19 lines

And then there's this:

CC arch/um/os-Linux/process.o
In file included from arch/um/include/skas_ptrace.h:12,

                 from arch/um/os-Linux/process.c:23:

arch/um/include/sysdep/skas_ptrace.h:9: error: redefinition of `struct ptrace_faultinfo' arch/um/include/sysdep/skas_ptrace.h:14: error:
redefinition of `struct ptrace_ldt'

The problem is that I installed my host kernel's headers, and that kernel has the skas patch installed, so the skas ptrace structures are already defined in <asm/ptrace.h>. Thankfully it's guarded by a #define that we can test, but even so we need to split that SKAS section out into a new header. (diff attached, not gitted since the SKAS part isn't maintained in git anyway.)

So the following patches are a terribly provisional way to fix this:
it works but it may not maintain the separation between skas and mainline that you want.

Quoted 5 lines
Quoted 2 lines

You maybe refer to the problem that without SKAS in host headers the resulting UML tree does not compile?

I *have* SKAS in the host headers. That's the problem (and it arguably shouldn't be).

Yes, I understood this, but with your patches the set of people having a problem is complemented (whoever _hasn't_ SKAS in host headers has a problem).

Quoted 7 lines
Quoted 3 lines

Yes, it is a problem. You are trying to
remove all duplications, and probably you should avoid them. Define a macro to test with a more reasonable name (say __UML_SKAS_SUPPORT ...).

OK, will do. I just thought that cutting the skas-ptrace stuff into its own header, rather than duplicating pieces of it between arch/ and include/um/, seemed more immediately reasonable.

Signature · 16 lines
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel