Augustin Cavalier ce2b9f5ec2 kernel/vm: Fix interaction between set_area_protection and set_memory_protection.
* When the page_protections array is allocated, we should clear the
   protections from the area's flags, since they aren't used for
   anything when the page_protections array is activated.

 * When set_area_protection is called and there is a page_protections
   array in use, it should be freed, and we should reset the protections
   on all pages.

 * Add some tests related to these behaviors.
2024-10-02 16:39:36 -04:00
..