summaryrefslogtreecommitdiff
path: root/Kernel/Memory/Region.cpp
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-06-12 23:11:43 -0600
committerAndreas Kling <kling@serenityos.org>2022-06-19 09:05:35 +0200
commit1d3b5d330dda7fb6732983d40e3e918b07aeeaf3 (patch)
tree04e0199e062b1d3fbbf3a713b5925e7392bd3a7f /Kernel/Memory/Region.cpp
parent940be192590d22873ecc7220416e05bfd8e07a8e (diff)
downloadserenity-1d3b5d330dda7fb6732983d40e3e918b07aeeaf3.zip
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.
Diffstat (limited to 'Kernel/Memory/Region.cpp')
-rw-r--r--Kernel/Memory/Region.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/Kernel/Memory/Region.cpp b/Kernel/Memory/Region.cpp
index 2ba28e17c2..d325a32f76 100644
--- a/Kernel/Memory/Region.cpp
+++ b/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);
}