Re: Stack unwinding using kprobes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mulyadi,

> > I was trying to probe shrink_list in mm/vmscan.c
> >
> > When my pre_handler is called, the esp doesn't point to the correct stack
> > frame. I put pre_handler for shrink_list itself. So ideally when call to
> > this point will hit, esp should already be pointing to the return_address
> > location in stack but its not so. Am I missing something?
> >
> > Thanks
>
> Interesting question, makes me do a bit research by reading the
> documentation.
>
> If you check kprobes.txt in Documentation folder of kernel source
> tree, in section 1.3.1 you'll read:
>
> "While the probed function is executing, its return address is
> stored in an object of type kretprobe_instance."
>
> I guess, you should check the return address in that object.

Thanks for pointing this out. I went through this document earlier, in fact 
thats how I found about kprobes. I wanted to know how shrink_list and cousins 
are behaving without having to recompile the kernel again and again. But in 
rush to probe them I might have overlooked things. I have go through it once 
again.

Regards
Himanshu

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux