Thread (13 messages) 13 messages, 4 authors, 2014-10-28

Re: [PATCH 3/3] powerpc/ftrace: simplify prepare_ftrace_return

From: Anton Blanchard <hidden>
Date: 2014-10-28 04:55:50

Hi Segher,
On Wed, Sep 24, 2014 at 12:33:07PM +1000, Anton Blanchard wrote:
quoted
We are scratching our heads trying to remember details of the issue
right now. In retrospect we should have linked the gcc bugzilla or
gcc commit details in the kernel commit message :)
There have been many GCC bugs in this area.

30282 (for 32-bit)
44199 (for 64-bit)
52828 (for everything, and this one should finally handle things for
good) Also a bunch of duplicates, and I'm sure I've missed some more.

The original issue as far as I remember: when using a frame pointer,
GCC would sometimes schedule the epilogue to do the stack adjust
before restoring all regs from the stack.  Then an interrupt comes
in, those saved regs are clobbered, kaboom.  We cannot disable the
frame pointer because -pg forces it (although PowerPC does not need
it).  The -mno-sched-epilog flag is a workaround: the epilogue (and
prologue) will not be reordered by instruction scheduling.  Slow code
is better than blowing up fast ;-)
Thanks for explaining it! It does look like the last issue wasn't
fixed until gcc 4.8. We'll drop that patch.

Anton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help