Przeglądaj źródła

Kernel: Tolerate cloning MAP_STACK regions that are PROT_NONE

There's nothing stopping a userspace program from keeping a bunch of
threads around with a custom signal stack in a suspended state with
their normal thread stack mprotected to PROT_NONE.

OpenJDK seems to do this, for example.
Andrew Kaster 3 lat temu
rodzic
commit
1d3b5d330d
1 zmienionych plików z 0 dodań i 2 usunięć
  1. 0 2
      Kernel/Memory/Region.cpp

+ 0 - 2
Kernel/Memory/Region.cpp

@@ -129,8 +129,6 @@ ErrorOr<NonnullOwnPtr<Region>> Region::try_clone()
         m_range, move(vmobject_clone), m_offset_in_vmobject, move(clone_region_name), access(), m_cacheable ? Cacheable::Yes : Cacheable::No, m_shared));
 
     if (m_stack) {
-        VERIFY(is_readable());
-        VERIFY(is_writable());
         VERIFY(vmobject().is_anonymous());
         clone_region->set_stack(true);
     }