How can I get the base address and size of a loaded kernel module?


I think you can use /proc/modules. It contains information about all currently loaded modules in the kernel. For example:

cat /proc/modules | grep i8k

Result could be:

i8k 14696 0 - Live 0xffffffffa03b8000


  1. The first column contains the name of the module.
  2. The second column refers to the memory size of the module, in bytes.
  3. The third column lists how many instances of the module are currently loaded. A value of zero represents an unloaded module.
  4. The fourth column states if the module depends upon another module to be present in order to function, and lists those other modules.
  5. The fifth column lists what load state the module is in: Live, Loading, or Unloading.
  6. Base memory address for a module in the kernel's virtual address space.

If you run:

awk '$1 ~ /i8k/ { print $1, $2, $6 }' /proc/modules

The result could be, values you need:

i8k 14696 0xffffffffa03b8000
| improve this answer | |
  • I had to run sudo cat /proc/modules in order to see the base addresses (6) – philn Jun 9 at 17:58

Size on /sys

I like this alternative as it gives just a single value:

cat /sys/module/<module-name>/coresize

Load address on pr_debug

If you enable pr_debug, that information is present, and this can be useful if the module panics at init_module.

Details at: How to get the address of a kernel module that was inserted using insmod? | Stack Overflow

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.