lkml.org 
[lkml]   [2007]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: oops in oprofile/dump_trace/X86 with 2.6.24-rcX
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 <jblunck@suse.de>
---
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 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: 2007-11-09 22:39    [W:0.055 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site