haiku/headers/private/kernel/vm
Michael Lotz 7418dbd908 Introduce debug page wise kernel area protection functions.
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.
2011-12-03 19:49:18 +01:00
..
vm_page.h
vm_priv.h
vm_types.h Add VM page allocation tracking similar to what happens in the slab already. 2011-11-04 18:07:07 +00:00
vm.h Introduce debug page wise kernel area protection functions. 2011-12-03 19:49:18 +01:00
VMAddressSpace.h
VMArea.h
VMCache.h Add an assert to ensure the wired count doesn't wrap. 2011-11-13 22:02:36 +01:00
VMTranslationMap.h Add debug helper functions to mark pages present. 2011-12-03 19:45:31 +01:00