Mailinglist Archive: opensuse-bugs (4691 mails)

< Previous Next >
[Bug 582222] kernel panic on boot with gcc-4.5-compiled kernel (Attempted to kill init!)
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 24 Feb 2010 18:52:37 +0000
  • Message-id: <20100224185237.406E924551B@xxxxxxxxxxxxxxxxxxxxxx>

--- Comment #17 from Jeff Mahoney <jeffm@xxxxxxxxxx> 2010-02-24 18:52:35 UTC ---
Created an attachment (id=344563)
--> (
ftrace: fix ftrace_event_call alignment for use with gcc 4.5

GCC 4.5 introduced behavior that forces the alignment of structures to
use the largest possible value. The default value is 32 bytes, so if
some structures are defined with a 4-byte alignment and others aren't
declared with an alignment constraint at all - it will align at 32-bytes.

For things like the ftrace events, this results in a non-standard array.
When initializing the ftrace subsystem, we traverse the _ftrace_events
section and call the initialization callback for each event. When the
structures are misaligned, we could be treating another part of the
structure (or the zeroed out space between them) as a function pointer.

This patch forces the alignment for all the ftrace_event_call structures
to 4 bytes.

Without this patch, the kernel fails to boot very early when built with
gcc 4.5.

It's trivial to check the alignment of the members of the array, so it
might be worthwhile to add something to the build system to do that

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >