Skip to content

Commit

Permalink
runtime: track_memory_map: wrap case containing decl in braces
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-immunant committed Sep 1, 2023
1 parent 9b0a021 commit 6d03c28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/track_memory_map.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define _GNU_SOURCE
#include <stdbool.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/ptrace.h>
Expand Down Expand Up @@ -43,7 +44,7 @@ bool is_op_permitted(struct memory_map *map, int event,
map, info->mremap.old_range, info->mremap.pkey))
return true;
break;
case EVENT_MPROTECT:
case EVENT_MPROTECT: {
/* allow mprotecting memory that has not been mprotected */
bool impacts_only_unprotected_memory =
memory_map_all_overlapping_regions_mprotected(map, info->mprotect.range,
Expand All @@ -61,6 +62,7 @@ bool is_op_permitted(struct memory_map *map, int event,
return true;

break;
}
case EVENT_PKEY_MPROTECT: {
/* allow mprotecting memory that has not been pkey_mprotected to our pkey */
bool impacts_only_unprotected_memory =
Expand Down

0 comments on commit 6d03c28

Please sign in to comment.