lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Feb 2010 09:09:25 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Jeff Mahoney <jeffm@...e.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ftrace: fix ftrace_event_call alignment for use with
 gcc 4.5

On Wed, 2010-02-24 at 14:33 -0500, Jeff Mahoney wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 02/24/2010 01:59 PM, Jeff Mahoney wrote:
> >  GCC 4.5 introduces 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
> >  automatically. Unfortunately, that only covers this case. I've asked one
> >  of the gcc developers about adding a warning when this condition is seen.
> 
> BTW, the analysis for this is available here:
> 
> https://bugzilla.novell.com/show_bug.cgi?id=582222
> 

Thanks! I'll apply this and push it forward (as well as to stable)

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ