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 Added vm_page_max_address() which returns the greatest address of accessible 2010-06-23 13:52:32 +00:00
vm_priv.h * Removed useless return parameter from vm_remove_all_page_mappings(). 2010-02-03 18:53:52 +00:00
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 * Introduced structures {virtual,physical}_address_restrictions, which specify 2010-06-14 16:25:14 +00:00
VMArea.h * First run through the kernel's private parts to use phys_{addr,size}_t 2010-05-25 21:34:08 +00:00
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