Page-Table Manipulation

Every process is given the impression that it is working with large, contiguous sections of memory. When a process requests access to a data in its memory, it is the responsibility of the operating system to map the virtual address provided by the process to the physical address of the actual memory where that data is stored. The page table is where the operating system stores its mappings of virtual addresses to physical addresses, with each mapping also known as a page table entry (PTE)

The CPU's memory management unit (MMU) stores a cache of recently used mappings from the operating system's page table in translation lookaside buffer (TLB). When a virtual address needs to be translated into a physical address, the TLB is searched first. If there is no match, the page fault handler will typically look up the address mapping in the page table to see whether a mapping exists (a page walk).

Jump-Start Task

Write a Linux kernel module that intercepts and reports (to terminal) all page-faults

Minimal-Requirement Task

Write a kernel module that will

  1. Redirect page-fault handling to signal handling
  2. In signal handling, find a mechanism to trigger the original do_page_fault