mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-23 16:31:20 -04:00
Merge 96836f463b
into 7481c8857f
This commit is contained in:
commit
7673582e23
3 changed files with 24 additions and 0 deletions
|
@ -1295,7 +1295,12 @@ COLD static void init_slow_path(void) {
|
|||
|
||||
atomic_store_explicit(&ro.slab_region_end, slab_region_end, memory_order_release);
|
||||
|
||||
#if defined(__ANDROID__) && defined(HAS_ARM_MTE)
|
||||
/* Do not seal to support disabling memory tagging */
|
||||
if (unlikely(memory_protect_ro(&ro, sizeof(ro)))) {
|
||||
#else
|
||||
if (unlikely(memory_protect_seal(&ro, sizeof(ro)))) {
|
||||
#endif
|
||||
fatal_error("failed to protect allocator data");
|
||||
}
|
||||
memory_set_name(&ro, sizeof(ro), "malloc read-only after init");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue