diff --git a/runtime/mmap_event.h b/runtime/mmap_event.h index 892c73bac..7810c8610 100644 --- a/runtime/mmap_event.h +++ b/runtime/mmap_event.h @@ -24,6 +24,7 @@ struct mremap_info { struct madvise_info { struct range range; + int advice; unsigned char pkey; }; diff --git a/runtime/track_memory_map.c b/runtime/track_memory_map.c index c627f60ea..1e176bad3 100644 --- a/runtime/track_memory_map.c +++ b/runtime/track_memory_map.c @@ -297,11 +297,10 @@ static bool interpret_syscall(struct user_regs_struct *regs, unsigned char pkey, info->range.start = regs->rdi; info->range.len = regs->rsi; info->pkey = pkey; - - int advice = regs->rdx; + info->advice = regs->rdx; debug_op("compartment %d madvise (%08zx, %zd) with advice=%d\n", info->pkey, - info->range.start, info->range.len, advice); + info->range.start, info->range.len, info->advice); break; } case EVENT_MPROTECT: {