driver address space
Quoted 42 lines · On Tue, 28 Jan 2003 Richard B. Johnson wrote :
Quoted 4 lines · nitin kumbhar
Hello,
I have a small query about kernel image organization. i am
using
2.4.7 kernel version.Is there any data structure in kernelwhich
Quoted 4 lines
will give
information about _all_ kernel symbols? i could get the data structure
which gives _exported_ symbols only. But not all symbols.Using
Quoted 2 lines
this
structure i want to access information about functions presentin
Quoted 2 lines
a driver,
which can be used to find out address range(_start_address_&
Quoted 2 lines
_end_address_) of the driver in kernel address space.
It is possible to get this information about functions ina
Quoted 2 lines
driver
using System.map. to get this information into kernel can wepush
Quoted 2 lines
the
content of this file into kernel image? i think this can bedone
Quoted 2 lines
either by
putting it at specific address or appending the image. Will itbe
Quoted 2 lines
OK to
accessSystem.map(all kernel symbols)in this way fromkernel?
Quoted 3 lines
Could
this cause any security or some other problems?
Or apart from this is there any other way to find outdriver's
Quoted 3 lines
address range in the kernel?
I hope this not something totally out of context. Thank
You.
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Regards,
NitinSince it's dynamic, i.e., the addresses depends upon other
drivers/modulesbeing loaded before yours, you just make anioctl()that returns anything you want, including the virtual or even physical address of anything in your driver.
hi Richard,
You are true if the driver is a module. But i think the same case is not with drivers present in the kernel image(when built with kernel). The position in the kernel address space where the drivers are loaded is fixed. it can change only if you recompile the kernel. correct me if i am going wrong somewhere.
About ioctl, ioctls can return the required values from the driver. But if the driver is present in the kernel (not as a module) where to find these return values(in this case start & end addresses of the driver). Here i am not getting the place or method to find the addresses.
it will be very helpful if someone could push me forward in correct direction.
Thank You.
Regards,
Nitin