1

I have some questions on the Kernel mapping of a Linux process' higher virtual address:

  1. Is that maps to the kernel text segment which is stored in the RAM(I read the vmlinuz will be extracted to the RAM)?

  2. What is the use of it?

  3. The pmap of a process shows it's mapping to the exe's segments, shared memory,stack,heap. Can I see the higher address kernel mapped also?

AdminBee
  • 22,803
Franc
  • 289

1 Answers1

0

It’s used for a number of things, including mapping the kernel binary. The x86-64 map is documented in the kernel, and shows the kernel text mapping (corresponding to vmlinuz) at 0xffffffff80000000. Other uses include the memory allocations made by the kernel, and a full mapping of physical memory.

The address space allocated for the kernel doesn’t show up in processes’ maps, apart from the legacy vsyscall map. In fact with KPTI, when in user mode, the vast majority of the kernel isn’t mapped into memory at all.

See also The Kernel space in the address space is reserved for us by what? and the other questions linked there.

Stephen Kitt
  • 434,908