lkml.org 
[lkml]   [2011]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] jump label: update for .39
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Thu, 2011-03-10 at 10:47 -0800, David Daney wrote:
>
> > The alignment requested by the assembler will have to satisfy *all* the
> > requested alignments, so manually forcing everything to .align 8 (or
> > .align 4 for 32-bit) should ensure that the linker doesn't put in any holes.
>
> I would agree with the assessment although, I don't know that it is
> documented anywhere that this is what happens. As the previous "bug"
> with the trace_events was solved by me adding .align(4) everywhere, I
> would think that .align(sizeof(long)) would work here too.
>
> It may be a good ideal to force this alignment, and not add wasted
> space. If anything, if this (hypothetical) bug appears, it will most
> likely show up as a crash on boot up. I'm not too concerned about it.

How can you be so sure it will trigger a crash on boot up ?

The sorting phase only compare key values, so NULL pointers will be
thought as valid. Following that, there is the initial no-op'ing phrase
that might crash (on the architectures using it). Then a NULL code
pointer is considered as the discarded "init" section. A NULL key will
just be a non-match, and thus skipped.

So I can very much see scenarios where this bug would silently skip jump
labels without a crash. This is what I am concerned about. Using the
approach that "a crash will happen" as a safety net to tell us that we
missed something seems very risky to me.

Thanks,

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com


\
 
 \ /
  Last update: 2011-03-10 22:43    [W:0.070 / U:6.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site