Skip to content

Commit

Permalink
runtime/track_memory_map: allow re-mprotecting memory during init
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-immunant committed Sep 27, 2023
1 parent 459a47e commit 99a0653
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runtime/track_memory_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ bool is_op_permitted(struct memory_map *map, int event,
false);
if (impacts_only_unprotected_memory)
return true;
/* during init, we allow re-mprotecting memory, which we need to alter
initially-RO destructors */
else if (!memory_map_is_init_finished(map))
return true;

/* allow mprotecting memory that is already writable */
uint32_t prot = memory_map_region_get_prot(map, info->mprotect.range);
Expand Down

0 comments on commit 99a0653

Please sign in to comment.