This is not the current version of the class.

Kernel 3: Page tables


In lecture, we discuss page tables.

Full lecture notes on kernelTextbook readings

Tries and x86-64 page tables

Page tables, abstractly


Virtual memory for kernel isolation

Virtual memory for process isolation

Virtual memory and kernel execution

x86-64 virtual memory: Addresses

x86-64 virtual memory: Pages

Why pages?

x86-64 virtual memory: Permissions and modes

Eve attacks kernel memory

uint8_t* ip = (uint8_t*) 0x4103c;
   // address of `syscall` from `obj/kernel.sym`
ip[0] = 0xeb;
ip[1] = 0xfe;
(void) sys_getpid();

Kernel fights back!

  1. Changes memory mapping function
  2. Handles the fault

x86-64 page table details

Eve strikes again