Sample Header Ad - 728x90

How to inspect the memory map of the kernel given "root" privileges?

2 votes
0 answers
610 views
I use pmap for inspecting the memory map of the user-space process ``. How to inspect the memory map of the kernel given "root" privileges (i.e. all capabilities)? The reason I'm interested is that I'm developing kernel modules, and thus would like to know which memory segment/section a symbol resides in. **Bonus**: Also, in order to obtain this information "offline", I've tried as follows: $ sudo readelf -a /boot/vmlinuz-5.8.0-50-generic readelf: Error: Not an ELF file - it has the wrong magic bytes at the start But apparently, the Linux image is not in ELF format (why?). How can I see the segments/sections of the kernel image?
Asked by Shuzheng (4931 rep)
May 8, 2021, 10:14 AM