lkml.org 
[lkml]   [2004]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Interrupt entry CONFIG_FRAME_POINTER fix
On Sun, 12 Sep 2004, Andi Kleen wrote:

> On Sun, 12 Sep 2004 18:16:28 +0900
> Tejun Heo <tj@home-tj.org> wrote:
>
> > On x86_64, rbp isn't saved on entering interrupt handler even when
> > CONFIG_FRAME_POINTER is turned on. This breaks profile_pc()
> > (resulting in oops) which uses regs->rbp to track back to the original
> > stack. Save full stack when CONFIG_FRAME_POINTER is specified.
>
>
> I don't think your patch is correct, you don't restore rbp ever and it gets corrupted.
>
> I think the correct change is to fix profile_pc() to not reference rbp, but just hardcode
> the rsp offset for the FP and non FP cases (8 and 0)

Yep, i botched up the patch, after looking at the disassembly on
x86_64 without CONFIG_FRAME_POINTER again it's definitely incorrect. In
fact there are still a few users such as _spin_lock_irqsave which push
flags onto the stack and the stack pointer isn't consistent across all
functions in that text section. I'm going to have to try Andi's previous
suggestions.

Thanks,
Zwane
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.046 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site