UML - Fix boot crash
PATCH 1/1 UML - Fix boot crash
My copying of linux/init.h didn't go far enough. The definition of __used singled out gcc minor version 3, but didn't care what the major version was. This broke when unit-at-a-time was added and gcc started throwing out initcalls.
This results in an early boot crash when ptrace tries to initialize a process with an empty, uninitialized register set.
--- arch/um/include/init.h | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/um/include/init.h +8 -0
@@ -45,6 +45,8 @@ typedef void (*exitcall_t)(void);# define __section (S ) __attribute__ ((__section__(#S)))#endif +#if __GNUC__ ==3 +#if __GNUC_MINOR__ >=3 # define __used __attribute__((__used__))#else
@@ -52,6 +54,12 @@ typedef void (*exitcall_t)(void);#endif #else +#if __GNUC__ ==4 +# define __used __attribute__((__used__)) +#endif +#endif + +#else #include <linux/compiler.h> #endif /* These are for everybody (although not all archs will actually
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 29 lines · On Wed, 23 Jul 2008 11:46:50 -0400 Jeff Dike <[email protected]> wrote:
My copying of
linux/init.hdidn't go far enough. The definition of__usedsingled out gcc minor version 3, but didn't care what the major version was. This broke when unit-at-a-time was added and gcc started throwing out initcalls.This results in an early boot crash when ptrace tries to initialize a process with an empty, uninitialized register set.
Signed-off-by Jeff Dike <[email protected]>--- arch/um/include/init.h | 8 ++++++++ 1 file changed, 8 insertions(+)Index:
linux-2.6.22/arch/um/include/init.h
===================================================================arch/um/include/init.h +2
-0@@ -45,6 +45,8 @@ typedef void (*exitcall_t)(void);# define __section (S ) __attribute__ ((__section__(#S)))#endif +#if __GNUC__ ==3 +#if __GNUC_MINOR__ >=3 # define __used __attribute__((__used__))#else @@ -52,6 +54,12 @@ typedef void (*exitcall_t)(void);#endif
arch/um/include/init.h typedef void (*exitcall_t)(void); · line 65
Quoted 10 lines
arch/um/include/init.h +6
-0#else +#if __GNUC__ ==4 +# define __used __attribute__((__used__)) +#endif +#endif + +#else #include <linux/compiler.h> #endif /* These are for everybody (although not all archs will actually
Needed in 2.6.26.x, but also applies to 2.6.25. Is it also needed in 2.6.25.x?
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Andrew Morton
Needed in 2.6.26.x, but also applies to 2.6.25. Is it also needed in 2.6.25.x?
It does apply nicely, but I think it's not needed for -stable. AIUI, -stable is for actual, realized bugs, and this one is more latent, being enabled by the unit-at-a-time change during 2.6.26-rc.
Jeff
Signature · 11 lines
Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · Andrew Morton
Needed in 2.6.26.x, but also applies to 2.6.25. Is it also needed in 2.6.25.x?
... and just to be clear, I mean I think it's not exactly 2.6.25.x material. It is definite 2.26.6.x material.
Jeff
Signature · 11 lines
Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 6 lines · Jeff Dike
Quoted 2 lines · Andrew Morton
Needed in 2.6.26.x, but also applies to 2.6.25. Is it also needed in 2.6.25.x?
... and just to be clear, I mean I think it's not exactly 2.6.25.x material. It is definite 2.26.6.x material.
Ok, fair enough, I'll queue it up when it hits Linus's tree.
Neat hack: If you add the line
cc: stable <[email protected]>
to the signed-off-by area of a patch, when it is applied by Linus it will be sent automatically to the stable team as well and we will know then that it is safe to apply to our trees. No additional work from you would be needed then.
thanks,
greg k-h
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel