Re: Kernel module to dump Used heap/stack of a user process

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

 





2012/5/14 Dhyan <linuxdhyan@xxxxxxxxx>
Dear All,

 I am writing a kernel module which will accept  user process id (PID) as input and dump all the address space of that user process,like  stack,heap segment.

I took mm->start_brk as start of heap ,mm->brk as end of heap,then i am seeing, even though user process is not using 33 pages heap size shows as 33 pages
 (mm->brk -mm->start_brk) . (This i verified using /proc/pid/maps) .Stack also behaves in similar way,

So is there any way i can find out the really used heap staring from mm->start_brk,So that i can dump only the used heap

--
Thanks
Dhyan

I am a kernelnewby and used to write a same kernel module.and hope to help you.
   please see the link
   http://blog.163.com/zhe_wang_2009/blog/static/17228212120123493614715/

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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