logoalt Hacker News

habermantoday at 2:13 AM2 repliesview on HN

TL;DR: when a user writes to /proc/self/mem, the kernel bypasses the MMU and hardware address translation, opting to emulate it in software (including emulated page faults!), which allows it to disregard any memory protection that is currently setup in the page tables.


Replies

IAmLiterallyABtoday at 4:59 AM

It doesn't bypass it exactly, it's still accessing it via virtual memory and the page tables. It's just that the kernel maintains one big linear memory map of RAM that's writable.

rramadasstoday at 3:34 AM

Thank You.