Questions: Memory Protection and Access Control Hardware

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A user-mode program attempts to write directly to its own page table entries in order to grant itself write access to a kernel page. What happens?

AThe write succeeds because the program is modifying its own address space
BThe write succeeds but the kernel detects it and reverts the change
CThe MMU triggers a protection fault because page table entries reside in kernel-only memory
DThe write is queued and executed after a context switch to kernel mode
Question 2 Multiple Choice

A buffer overflow attack injects shellcode into a program's stack buffer. On a system enforcing W^X, what prevents the shellcode from executing?

AThe OS scans newly written stack pages for shellcode patterns before execution
BStack pages are marked write but not execute, so the CPU raises a fault if execution is attempted
CStack memory is physically separated from code memory by the MMU
DThe compiler inserts canary values that detect the overflow before execution reaches the shellcode
Question 3 True / False

A user process cannot access kernel memory even if it knows the exact virtual address of a kernel data structure.

TTrue
FFalse
Question 4 True / False

Memory protection relies on the operating system checking access permissions in software after each memory reference.

TTrue
FFalse
Question 5 Short Answer

Why can't a user-mode program disable memory protection or modify its own page table entries to gain unauthorized access?

Think about your answer, then reveal below.