Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: Oprofile bug ? | From | (Frank Ch. Eigler) | Date | Fri, 12 Nov 2010 16:45:14 -0500 |
| |
"Sylvain GENEVES" <Sylvain.Geneves@inrialpes.fr> writes:
> [...] > I'm encountering unexpected behaviour with OProfile when the profiled > system is under heavy load : "BUG: unable to handle kernel paging request > at 0000000000004cc3" (full console message is attached). > [...] > Anyone has any idea on what is happening ?
Just glancing at that oops & my local random kernel build, it appears as though this part of arch/x86/kernel/time.c:profile_pc is failing:
unsigned long profile_pc(struct pt_regs *regs) { unsigned long pc = instruction_pointer(regs);
if (!user_mode_vm(regs) && in_lock_functions(pc)) { #ifdef CONFIG_FRAME_POINTER return *(unsigned long *)(regs->bp + sizeof(long)); #else ^^^^^^^^^^^^^^^^^^ [...]
regs->bp must have been 0x4cbb, which this code turns into an unchecked dereferences at 0x4cbb+8 = 0x4cc3. I don't have a theory as to why regs->bp should have that value in it, but the kernel should probably use probe_kernel_read() or somesuch to validate the value before dereferencing it.
- FChE
| ![\](/images/icornerr.gif) |