The Linux kernel high mapping is not safe enough?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
kingwah
Posts: 3
Joined: Tue Jul 30, 2019 11:53 pm

The Linux kernel high mapping is not safe enough?

Post by kingwah »

In the source codes of Linux kernel 3.10.0, I have noticed that the virtual address range [__START_KERNEL_map, __START_KERNEL_map+size] is mapped to the physical address range [phys_base, phys_base+size], where size = _end-_text is the size of the kernel image, and phys_base is the delta between the address kernel is actually running at and the address kernel is compiled to run at. But from "arch/x86/kernel/vmlinux.lds.S", the virtual address range compiled for the kernel image is [__START_KERNEL, __START_KERNEL+size], where __START_KERNEL = __START_KERNEL_map + __PHYSICAL_START, so when we want to access symbols within the virtual address range (__START_KERNEL_map+size, __START_KERNEL+size], it would break because there is no page table entries for this?
Post Reply