2 ms·
You could have an initial code segment which generates the dynamic mappings and then performs a system call. The system call would map in a new non-shared page
by Diggsey 8y ago
You could have an initial code segment which generates the dynamic mappings and then performs a system call.
The system call would map in a new non-shared page which the kernel has dynamically generated from the supplied mappings. The user-land never sees the page as writable, only as executable, the kernel generates only jump instructions, and limits this behaviour to specific pages determined when the executable is loaded.
- saagarjha 8y agoThat's what full Relocation Read-Only essentially does, right? You pay for this by having to bind all addresses at startup time rather than lazily as they're needed.