In
this document (page 32) I've read that kernel is statically mapped during bootup at virtual address 0xc0000000 + 0x100000 and virtual-to-physical memory mapping is just a linear transformation (virtual address 0xc0000000 is physical address 0x0). Is this correct if we are talking about linux kernel? Linux kernel shouldn't be swapped, right? I need to get virtual addresses of some instructions in kernel, I tried to dissasamble
/proc/kcore using
objdump tool. According to Linux Documentation Project this file is an image of physical memory. How can I translate addresses obtained by objdump to virtual addresses so I can add kprobes on it?
Thanks in advance!