X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..a991bd8d3e7fe02dbca0644054bab73c5b75324a:/libsyscall/mach/mach_vm.c diff --git a/libsyscall/mach/mach_vm.c b/libsyscall/mach/mach_vm.c index f8fbf921d..8b8dfa3fa 100644 --- a/libsyscall/mach/mach_vm.c +++ b/libsyscall/mach/mach_vm.c @@ -58,8 +58,8 @@ mach_vm_allocate( rv = _kernelrpc_mach_vm_allocate(target, address, size, flags); } - if (__syscall_logger && rv == KERN_SUCCESS && !(flags & VM_MAKE_TAG(VM_MEMORY_STACK))) { - int userTagFlags = flags & VM_FLAGS_ALIAS_MASK; + int userTagFlags = flags & VM_FLAGS_ALIAS_MASK; + if (__syscall_logger && rv == KERN_SUCCESS && (userTagFlags != VM_MAKE_TAG(VM_MEMORY_STACK))) { __syscall_logger(stack_logging_type_vm_allocate | userTagFlags, (uintptr_t)target, (uintptr_t)size, 0, (uintptr_t)*address, 0); } @@ -184,9 +184,9 @@ mach_vm_map( offset, copy, cur_protection, max_protection, inheritance); } - if (__syscall_logger && rv == KERN_SUCCESS && !(flags & VM_MAKE_TAG(VM_MEMORY_STACK))) { + int userTagFlags = flags & VM_FLAGS_ALIAS_MASK; + if (__syscall_logger && rv == KERN_SUCCESS && (userTagFlags != VM_MAKE_TAG(VM_MEMORY_STACK))) { int eventTypeFlags = stack_logging_type_vm_allocate | stack_logging_type_mapped_file_or_shared_mem; - int userTagFlags = flags & VM_FLAGS_ALIAS_MASK; __syscall_logger(eventTypeFlags | userTagFlags, (uintptr_t)target, (uintptr_t)size, 0, (uintptr_t)*address, 0); }