How are memory read, write, execute permissions enforced in the Linux kernel? -
how system able restrict processes being able write regions of memory set read-only? in particular, how linux kernel able enforce these permissions, assuming hardware not able job kernel?
my initial guess these regions of memory not mapped process's address space, whenever process tries accessing these regions of memory, page fault generated, allows kernel take control check in order. realize degrade performance, i'm here asking understanding if there smarter method enforcing these permissions.
the task of enforcing memory protection handled mmu. i'm not aware of architecture have mmu don't have hardware support memory permissions. guess talking mmu-less systems here.
for long time linux required mmu work. still if want support mmu-less systems. comes uclinux project merged upstream time ago. system compiled nommu
not, however, work normal linux system (a lot of applications won't work on it) , no memory protection 1 of limitations.
to answer question directly - memory protection on linux depends on hardware support it. if it's absent, kernel won't try emulate it.
now idea seems fine (if impractical) in order this, still need virtual memory support requires kind of mmu. stated earlier, don't think there systems have mmu not support memory protection. either way, linux not seem support case.
Comments
Post a Comment