Prev: ata: failed to IDENTIFY / SRST failed (errno = -16) problems on/after booting 2.6.35-rc3
Next: mmotm 2010-07-01 pm_get_wakeup_count() declaration
From: Steven Rostedt on 8 Jul 2010 16:20 On Thu, 2010-07-08 at 21:53 +0300, Zeev Tarantov wrote: > I've just uploaded the disassembly to bugzilla: > https://bugzilla.kernel.org/show_bug.cgi?id=16353 Thanks I'll take a look. > > With gcc 4.4.4 it boots and objdump's output starts with: > Disassembly of section .data: > > ffffffff81736898 <__start_syscalls_metadata>: > ffffffff81736898: a3 55 5f 81 ff ff ff mov %eax,0xffffffff815f55 > ffffffff8173689f: ff 00 > ffffffff817368a1: 00 00 add %al,(%rax) > ffffffff817368a3: 00 06 add %al,(%rsi) > ffffffff817368a5: 00 00 add %al,(%rax) > > With gcc 4.5.1 rev. 161655 objdump shows: > Disassembly of section .data: > > ffffffff8173c438 <__start_syscalls_metadata>: > ... > > ffffffff8173c440 <__syscall_meta__mmap>: > ffffffff8173c440: 2b ab 5f 81 ff ff sub -0x7ea1(%rbx),%ebp > ffffffff8173c446: ff (bad) > ffffffff8173c447: ff 00 incl (%rax) > ffffffff8173c449: 00 00 add %al,(%rax) > ffffffff8173c44b: 00 06 add %al,(%rsi) > ffffffff8173c44d: 00 00 add %al,(%rax) > > I don't know why -D, but that's the output. > Hope it helps. Without -D it wont disassemble data sections. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Steven Rostedt on 8 Jul 2010 23:30 On Thu, 2010-07-08 at 21:53 +0300, Zeev Tarantov wrote: > With gcc 4.5.1 rev. 161655 objdump shows: > Disassembly of section .data: > > ffffffff8173c438 <__start_syscalls_metadata>: > ... > > ffffffff8173c440 <__syscall_meta__mmap>: > ffffffff8173c440: 2b ab 5f 81 ff ff sub -0x7ea1(%rbx),%ebp Yeah, this is definitely the issue. It starts off at ffffffff8173c438, when the first item is really at ffffffff8173c440. Can you try this patch out: -- Steve 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 \ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Zeev Tarantov on 9 Jul 2010 04:50 On Fri, Jul 9, 2010 at 06:26, Steven Rostedt <rostedt(a)goodmis.org> wrote: > On Thu, 2010-07-08 at 21:53 +0300, Zeev Tarantov wrote: > >> With gcc 4.5.1 rev. 161655 objdump shows: >> Disassembly of section .data: >> >> ffffffff8173c438 <__start_syscalls_metadata>: >> � � � � ... >> >> ffffffff8173c440 <__syscall_meta__mmap>: >> ffffffff8173c440: � � � 2b ab 5f 81 ff ff � � � sub � �-0x7ea1(%rbx),%ebp > > Yeah, this is definitely the issue. It starts off at ffffffff8173c438, > when the first item is really at ffffffff8173c440. > > Can you try this patch out: > > -- Steve > > 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 � � � � � � � � � � � � �\ > > > > Boots fine with this applied. Linux version 2.6.35-rc4 (wolf(a)wolfpc) (gcc version 4.5.1-pre9999 20100701 (prerelease) rev. 161655 (Gentoo SVN) ) #5 SMP Fri Jul 9 11:13:08 IDT 2010 I hope Linus accepts this patch as it seems to me the compiler is doing something it is allowed to do. Thank you for the prompt response! -Zeev -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Frederic Weisbecker on 9 Jul 2010 09:10 On Fri, Jul 09, 2010 at 11:45:09AM +0300, Zeev Tarantov wrote: > On Fri, Jul 9, 2010 at 06:26, Steven Rostedt <rostedt(a)goodmis.org> wrote: > > On Thu, 2010-07-08 at 21:53 +0300, Zeev Tarantov wrote: > > > >> With gcc 4.5.1 rev. 161655 objdump shows: > >> Disassembly of section .data: > >> > >> ffffffff8173c438 <__start_syscalls_metadata>: > >> � � � � ... > >> > >> ffffffff8173c440 <__syscall_meta__mmap>: > >> ffffffff8173c440: � � � 2b ab 5f 81 ff ff � � � sub � �-0x7ea1(%rbx),%ebp > > > > Yeah, this is definitely the issue. It starts off at ffffffff8173c438, > > when the first item is really at ffffffff8173c440. > > > > Can you try this patch out: > > > > -- Steve > > > > 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 � � � � � � � � � � � � �\ > > > > > > > > > > Boots fine with this applied. Great! > Linux version 2.6.35-rc4 (wolf(a)wolfpc) (gcc version 4.5.1-pre9999 > 20100701 (prerelease) rev. 161655 (Gentoo SVN) ) #5 SMP Fri Jul 9 > 11:13:08 IDT 2010 > > I hope Linus accepts this patch as it seems to me the compiler is > doing something it is allowed to do. In fact the alignment is on the definition already, the problem that appears here is that this version of gcc also requires the alignment to be on the declaration. Silly or not, that easily fixes the issue. > > Thank you for the prompt response! Thanks for your report and testing! > -Zeev -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Steven Rostedt on 9 Jul 2010 10:10
On Fri, 2010-07-09 at 15:04 +0200, Frederic Weisbecker wrote: > > > > Thank you for the prompt response! > > > > Thanks for your report and testing! Yes thanks! Zeev, can I add your "Tested-by:" tag, and Frederic your "Acked-by:"? -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |