![]() |
Accessing and performing operations on Base level kernel structure
Dear All,
We all know linux kernel base layer is made up of structures, in which every object of kernel is well defined. Structure members correspond to object properties required to define object behavior. For example if we take case of File system.It composed of four objects , superblock objects, inode objects, file objects and dentry object.Each having well defined structure which is being operated by system call handler and by system call service routine in the kernel mode. Now my question is even in kernel mode we do not have some mechanism by which we can get access to pointer of these structures.We have some macro. If I want to manipulate structure on my on way, or performing some more operation defined by me.For example after the crash of Hard Disk Drive, having ext2/3 file system, If i want to know all the inode pointers, and block details. Can I have some way out to do desired operation ?? Can anybody suggest me some mechanism to operate on these base label structures, even in kernel mode .. All suggestions are welcomed. Thanks & Regards. Ankur |
You need a Linux kernel debugger, for example kdb, and a kernel with debugging enabled (CONFIG_KDB=y). If you have a serial or ethernet connection to another machine, you can also use kgdb from the other machine. The starting point for further Linux kernel debugging information is here.
Hope this helps, Nominal Animal |
Dear Nominal Animal,
Thanks for the information, you have provided.But All this I knew earlier.I asked how to take base level structure pointers under our control to perform desired task ? If you knew please help me in this regard. Ankur |
Quote:
One way you can unravel the kernel access macros and inline functions is to write a small test function, and compile it to symbolic assembly in the kernel tree. Perhaps you can give a more detailed description on what you actually want to accomplish? Nominal Animal |
Dear Nominal Animal,
I am struggling with the installation of KDB with Fedora Core 5.In fact I am not getting the proper documentation of KDB.Even stated on the sgi website or stated by you.It would be a great help if you can provide me the link of documentation you have stated.Or it you have some good documents, please do the great favor by mailing me at smile.ankur@gmail.com. It would be a great help in my work. Thanks and Regards. Ankur |
Does this help a bit: http://bobcares.com/blog/?p=188 for installation of Kdb?
|
All times are GMT -5. The time now is 02:11 AM. |