From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>,
Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH 2/2] Tracepoints: Fix section alignment using pointer array
Date: Wed, 02 Feb 2011 13:56:55 -0500 [thread overview]
Message-ID: <1296673015.10797.66.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20110202183138.GB27022@Krystal>
On Wed, 2011-02-02 at 13:31 -0500, Mathieu Desnoyers wrote:
> > History:
> >
> > commit 7e066fb870fcd1025ec3ba7bbde5d541094f4ce1 added the aligned(32) type and
> > variable attribute to the tracepoint structures to deal with gcc happily
> > aligning statically defined structures on 32-byte multiples.
> >
> > commit 15e3540ce2159705f18fad6147ffedf04445ad64 tried to use a 8-byte alignment
> > for tracepoint structures by applying both the variable and type attribute to
> > tracepoint structures definitions and declarations. It worked fine with gcc
> > 4.5.1, but broke with gcc 4.4.4 and 4.4.5.
>
> Small nit: this reference to commit 15e3540ce2159705f18fad6147ffedf04445ad64
> should be changed to a non-commit-id-related explanation, because the commit has
> been rolled back from -tip.
OK, I just did a git commit --amend to fix it. Here's the new text:
commit 7e066fb870fcd1025ec3ba7bbde5d541094f4ce1 added the aligned(32) type a
variable attribute to the tracepoint structures to deal with gcc happily
aligning statically defined structures on 32-byte multiples.
One attempt was to use a 8-byte alignment for tracepoint structures by apply
both the variable and type attribute to tracepoint structures definitions an
declarations. It worked fine with gcc 4.5.1, but broke with gcc 4.4.4 and 4.
The reason is that the "aligned" attribute only specify the _minimum_ alignm
for a structure, leaving both the compiler and the linker free to align on
larger multiples. Because tracepoint.c expects the structures to be placed a
array within each section, up-alignment cause NULL-pointer exceptions due to
extra unexpected padding.
This version has just been pushed. I just changed the wording to leave
out the reference to the reverted commit.
-- Steve
next prev parent reply other threads:[~2011-02-02 18:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 18:06 [PATCH 0/2] [GIT PULL][v2.6.38]: tracing: alignment fixes (take 2) Steven Rostedt
2011-02-02 18:06 ` [PATCH 1/2] tracing: Replace trace_event struct array with pointer array Steven Rostedt
2011-02-02 18:42 ` Mathieu Desnoyers
2011-02-02 18:53 ` Steven Rostedt
2011-02-02 22:50 ` David Miller
2011-02-03 0:46 ` Steven Rostedt
2011-02-03 0:49 ` David Miller
2011-02-02 18:06 ` [PATCH 2/2] Tracepoints: Fix section alignment using " Steven Rostedt
2011-02-02 18:31 ` Mathieu Desnoyers
2011-02-02 18:47 ` Steven Rostedt
2011-02-02 18:56 ` Steven Rostedt [this message]
2011-02-02 19:32 ` Mathieu Desnoyers
2011-02-02 22:20 ` Thomas Gleixner
2011-02-03 0:43 ` Steven Rostedt
2011-02-02 22:51 ` David Miller
2011-02-03 0:44 ` [PATCH 0/2] [GIT PULL][v2.6.38]: tracing: alignment fixes (take 2) Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296673015.10797.66.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®