driver load map

driver load map

Post by David Stroup » Sat, 11 May 2002 23:20:16



Once a driver is loaded, how can I determine the address of exported
functions within that driver?  I have a user program that seems to be
calling the wrong address.  I can open the driver, but the first ioctl
call to the driver hammers the system...I get an oops and a kernel panic
and a reboot.  Any ideas would be very helpful.

TIA
David

 
 
 

driver load map

Post by A. Kaul » Sun, 12 May 2002 03:03:15


Why not modify the driver to print the addresses you require? You could
put also some checks in the IOCTL path there as well!

> Once a driver is loaded, how can I determine the address of exported
> functions within that driver?  I have a user program that seems to be
> calling the wrong address.  I can open the driver, but the first ioctl
> call to the driver hammers the system...I get an oops and a kernel panic
> and a reboot.  Any ideas would be very helpful.

> TIA
> David


 
 
 

driver load map

Post by Wolfgang Den » Sun, 12 May 2002 04:37:15



>Once a driver is loaded, how can I determine the address of exported
>functions within that driver?  I have a user program that seems to be

Read /proc/ksyms ...

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
It's all Klatchian to me.
        - Terry Pratchett & Stephen Briggs, _The Discworld Companion_

 
 
 

driver load map

Post by el.. » Fri, 24 May 2002 00:29:05




Quote:>Once a driver is loaded, how can I determine the address of
>exported functions within that driver?

/proc/ksyms

Quote:>I have a user program that seems to be calling the wrong
>address.

User programs don't call addresses; they make syscalls and the
kernel uses the drivers registration to call the driver's
routines.

Quote:>I can open the driver, but the first ioctl call to the driver
>hammers the system...I get an oops and a kernel panic and a
>reboot. Any ideas would be very helpful.

Put some debug code in the ioctl routine. Also check that you are
using the arguments correctly.

--
http://www.spinics.net/linux/