All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Steven Rostedt <srostedt@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	fweisbec@gmail.com, zeev.tarantov@gmail.com, rostedt@goodmis.org,
	srostedt@redhat.com, tglx@linutronix.de
Subject: [tip:perf/urgent] tracing: Add alignment to syscall metadata declarations
Date: Fri, 9 Jul 2010 20:21:40 GMT	[thread overview]
Message-ID: <tip-44a54f787c0abcf75a2ed49b8ec8b2b512468f73@git.kernel.org> (raw)
In-Reply-To: <AANLkTinkKVmB0fpVeqUkMeqe3ZYeXJdI8xDuzJEOjYwh@mail.gmail.com>

Commit-ID:  44a54f787c0abcf75a2ed49b8ec8b2b512468f73
Gitweb:     http://git.kernel.org/tip/44a54f787c0abcf75a2ed49b8ec8b2b512468f73
Author:     Steven Rostedt <srostedt@redhat.com>
AuthorDate: Fri, 9 Jul 2010 15:41:44 -0400
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Fri, 9 Jul 2010 15:53:04 -0400

tracing: Add alignment to syscall metadata declarations

For some reason if we declare a static variable and then assign it
later, and the assignment contains a __attribute__((__aligned__(#))),
some versions of gcc will ignore it.

This caused the syscall meta data to not be compact in its section
and caused a kernel oops when the section was being read.

The fix for these versions of gcc seems to be to add the aligned
attribute to the declaration as well.

This fixes the BZ regression:

  https://bugzilla.kernel.org/show_bug.cgi?id=16353

Reported-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Tested-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <AANLkTinkKVmB0fpVeqUkMeqe3ZYeXJdI8xDuzJEOjYwh@mail.gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/syscalls.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7f614ce..13ebb54 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -124,7 +124,8 @@ extern struct trace_event_functions enter_syscall_print_funcs;
 extern struct trace_event_functions exit_syscall_print_funcs;
 
 #define SYSCALL_TRACE_ENTER_EVENT(sname)				\
-	static struct syscall_metadata __syscall_meta_##sname;		\
+	static struct syscall_metadata					\
+	__attribute__((__aligned__(4))) __syscall_meta_##sname;		\
 	static struct ftrace_event_call					\
 	__attribute__((__aligned__(4))) event_enter_##sname;		\
 	static struct ftrace_event_call __used				\
@@ -138,7 +139,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
 	}
 
 #define SYSCALL_TRACE_EXIT_EVENT(sname)					\
-	static struct syscall_metadata __syscall_meta_##sname;		\
+	static struct syscall_metadata					\
+	__attribute__((__aligned__(4))) __syscall_meta_##sname;		\
 	static struct ftrace_event_call					\
 	__attribute__((__aligned__(4))) event_exit_##sname;		\
 	static struct ftrace_event_call __used				\

      parent reply	other threads:[~2010-07-09 20:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 13:04 2.6.35 regression Zeev Tarantov
2010-07-08 13:22 ` Steven Rostedt
2010-07-08 14:08   ` Sam Ravnborg
2010-07-08 14:17     ` Steven Rostedt
2010-07-08 18:53   ` Zeev Tarantov
2010-07-08 20:14     ` Steven Rostedt
2010-07-09  3:26     ` Steven Rostedt
2010-07-09  8:45       ` Zeev Tarantov
2010-07-09 13:04         ` Frederic Weisbecker
2010-07-09 14:03           ` Steven Rostedt
2010-07-09 14:10             ` Frederic Weisbecker
2010-07-09 16:52             ` Zeev Tarantov
2010-07-09 20:21         ` tip-bot for Steven Rostedt [this message]

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=tip-44a54f787c0abcf75a2ed49b8ec8b2b512468f73@git.kernel.org \
    --to=srostedt@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=zeev.tarantov@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.