Security-wise, this does not make a huge difference. If someone can write to kernel memory (or even read it), the security of the system is compromised anyway.
There are, however, reasons to map not everything at once: doing so will obviously consume more physical memory and it might not be desirable to fix the size of the kernel heap to some smallish number of pages.
_________________ managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
|