mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Zeev Tarantov <zeev.tarantov@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Maciej Rutecki <maciej.rutecki@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: 2.6.35 regression
Date: Thu, 8 Jul 2010 16:08:54 +0200	[thread overview]
Message-ID: <20100708140854.GA11983@merkur.ravnborg.org> (raw)
In-Reply-To: <20100708132237.GA22830@goodmis.org>

> 
> 		if (start->name && !strcmp(start->name + 3, str + 3))
> 			return start;
> 
> Now the "start" is iterating from: 
> 
> 	start = (struct syscall_metadata *)__start_syscalls_metadata;
> 	stop = (struct syscall_metadata *)__stop_syscalls_metadata;
> 
> 
> If for some reason, gcc did not link the metadata in a nice array,
> this could cause the start to index incorrectly, which would
> make the "start->name" reference be something pointing to left field.

In vmlinux.lds.h we have the following code:
#define TRACE_SYSCALLS() VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
                         *(__syscalls_metadata)                         \
                         VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;

But there is nothing that guarantee that
__syscalls_metadata starts at the address
assigned to __start_syscalls_metadata.

The will align __syscalls_metadata accoding to the
largest member in that section.

We need to do one of two things:
1) Make sure __start_syscalls_metadata is properly aligned
2) or make the code robust against misaligned symbols.

> 
> Zeev, can you try to reproduce it with gcc 4.4.
> 
> And for now could you send me the output of this:
> 
>  objdump -Dr --start-addr 0x`nm vmlinux | grep __start_syscalls_metadata | cut -d' ' -f 1` \
>     --stop-addr 0x`nm vmlinux | grep __stop_syscalls_metadata | cut -d' ' -f 1` vmlinux
> 
This output would be great to have just to check if my assumption above is correct.

	Sam

  reply	other threads:[~2010-07-08 14:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 13:04 Zeev Tarantov
2010-07-08 13:22 ` Steven Rostedt
2010-07-08 14:08   ` Sam Ravnborg [this message]
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:perf/urgent] tracing: Add alignment to syscall metadata declarations tip-bot for 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=20100708140854.GA11983@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.rutecki@gmail.com \
    --cc=rjw@sisk.pl \
    --cc=rostedt@goodmis.org \
    --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 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®