开启kaslr后,kernel image 在vmalloc区域. 运行地址与链接地址会有一个offset
addr_run = addr_link + offset //开启KASLR
addr_run = addr_link + _text - (KIMAG_VADDR+TEXT_OFFSET)//_text为重定向后的值
addr_link = addr_run - _text_start + (vmalloc_start+TEX_OFFSET)//ARM64 KIMAGE_VADDR==vmalloc_start
kimage_vaddr= _text - TEXT_OFFSET //如果开启KASLR后,_text会重定向,
kimage_voffset //kernel image虚拟地址-kernel image物理地址
kaslr_offset= kimage_vaddr - KIMAGE_VADDR
memstart_addr //the base of physical memory
#define KERNEL_START _text
#define KERNEL_END _end
#define PAGE_OFFSET ((-1)<<VA_BITS)//PAGE_OFFSET - the virtual address of the start of the linear map
来源:CSDN
作者:Robin.Yin
链接:https://blog.csdn.net/bin_linux96/article/details/104718888