On Thu, Nov 08, Robert Fitzsimons wrote:

> A couple of days ago I tried to use oprofile with a recent build of
> 2.6.24-rc1, this resulted in a oops 'BUG: unable to handle kernel paging
> request at virtual address'.

Sorry,

this only happens 32bit. Somehow I broke this when I introduced
stack_pointer(). Here is a patch that fixes the problem.

Thanks,
Jan

--
Subject: oprofile: Fix oops on x86 32-bit

x86 32-bit isn't saving the stack pointer to pt_regs->esp on when an
interrupt occures.

Signed-off-by: Jan Blunck <[EMAIL PROTECTED]>
---
 include/asm-x86/ptrace.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/include/asm-x86/ptrace.h
===================================================================
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -60,7 +60,7 @@ static inline int v8086_mode(struct pt_r
 
 #define instruction_pointer(regs) ((regs)->eip)
 #define frame_pointer(regs) ((regs)->ebp)
-#define stack_pointer(regs) ((regs)->esp)
+#define stack_pointer(regs) ((unsigned long)(regs))
 #define regs_return_value(regs) ((regs)->eax)
 
 extern unsigned long profile_pc(struct pt_regs *regs);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to