Re: Stack unwinding using kprobes

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

 



Hi Himanshu....

On Sun, Aug 9, 2009 at 3:09 PM, Himanshu
Chauhan<himanshu@xxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> 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.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

--
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