rnunes
rnunes

Reputation: 2835

How to know which is the current kernel module?

I'm using User Mode Linux and I'm redefining some I/O memory related functions. The idea it's that any function that is called from a list of our own kernel modules will be handled differently from the rest of the modules.

Is that possible to know whichy module is calling (kernel module name would be enough) a function like writel?

Upvotes: 0

Views: 147

Answers (1)

y_ug
y_ug

Reputation: 1124

Libunwind defines a portable and efficient C programming interface (API) to determine the call-chain of a program (http://savannah.nongnu.org/projects/libunwind).
/proc/modules file displays a list of all modules loaded into the kernel along with their sizes and memory offsets.

Upvotes: 1

Related Questions