Skip to content

Commit

Permalink
interceptor: Add note about protection flipping on RWX systems
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed May 10, 2024
1 parent 071eccf commit 7d9e1a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gum/guminterceptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,13 @@ gum_interceptor_transaction_end (GumInterceptorTransaction * self)

if (!rwx_supported)
{
/*
* We don't bother restoring the protection on RWX systems, as we would
* have to determine the old protection to be able to do so safely.
*
* While we could easily do that, it would add overhead, but it's not
* really clear that it would have any tangible upsides.
*/
for (cur = addresses; cur != NULL; cur = cur->next)
{
gpointer target_page = cur->data;
Expand Down

0 comments on commit 7d9e1a4

Please sign in to comment.