7418dbd908
This adds a pair of functions vm_prepare_kernel_area_debug_protection() and vm_set_kernel_area_debug_protection() to set a kernel area up for page wise protection and to actually protect individual pages respectively. It was already possible to read and write protect full areas via area protection flags and not mapping any actual pages. For areas that actually have mapped pages this doesn't work however as no fault, at which the permissions could be checked, is generated on access. These new functions use the debug helpers of the translation map to mark individual pages as non-present without unmapping them. This allows them to be "protected", i.e. causing a fault on read and write access. As they aren't actually unmapped they can later be marked present again. Note that these are debug helpers and have quite a few restrictions as described in the comment above the function and is only useful for some very specific and constrained use cases. |
||
---|---|---|
.. | ||
vm_page.h | ||
vm_priv.h | ||
vm_types.h | ||
vm.h | ||
VMAddressSpace.h | ||
VMArea.h | ||
VMCache.h | ||
VMTranslationMap.h |