Benedict Schlüter
Benedict Schlüter

Reputation: 462

How to determine the memory address range of Linux-Kernel objects

I want to inspect the memory where the functions from kernel/bpf/verifier.c are loaded into. After compilation to verifier.o the object is linked "into" the kernel. At /proc/kallsyms only non static functions are listed. However I want the addresses of all functions defined in that c file. If kaslr is turned off they should lie sequentially in the kernel space or?

If so is there a way to determine the address range?

Thanks

Upvotes: 0

Views: 787

Answers (1)

Benedict Schlüter
Benedict Schlüter

Reputation: 462

The solution for my particular problem is to compile the kernel with debug_info=y and obtain the address range from the large vmlinux binary with readelf -Ws vmlinux

However the kernel needs to be bootet with nokalsr or kalsr turned off in the config at compile time.

Upvotes: 1

Related Questions