Commit 53003343 authored by Bartek Nowierski's avatar Bartek Nowierski Committed by Chromium LUCI CQ

[PartitionAlloc] Make pages inaccessible when decommitting

Change-Id: If8ffec8205961a2213dfe7150d374a828320c2c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2548104Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Commit-Queue: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832242}
parent 5e7a1411
......@@ -569,7 +569,7 @@ void* PartitionBucket<thread_safe>::SlowPathAlloc(
void* addr = SlotSpanMetadata<thread_safe>::ToPointer(new_slot_span);
root->RecommitSystemPagesForData(
addr, new_slot_span->bucket->get_bytes_per_span(),
PageKeepPermissionsIfPossible);
PageUpdatePermissions);
new_slot_span->Reset();
*is_already_zeroed = kDecommittedPagesAreAlwaysZeroed;
}
......
......@@ -168,7 +168,7 @@ void SlotSpanMetadata<thread_safe>::Decommit(PartitionRoot<thread_safe>* root) {
PA_DCHECK(!bucket->is_direct_mapped());
void* addr = SlotSpanMetadata::ToPointer(this);
root->DecommitSystemPagesForData(addr, bucket->get_bytes_per_span(),
PageKeepPermissionsIfPossible);
PageUpdatePermissions);
// We actually leave the decommitted slot span in the active list. We'll sweep
// it on to the decommitted list when we next walk the active list.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment