github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/netbsd/mm.txt (about)

     1  # Copyright 2017 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <sys/types.h>
     5  include <sys/mman.h>
     6  
     7  mmap(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd, pad const[0], offset fileoff)
     8  compat_43_ommap(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd, pos fileoff[intptr])
     9  munmap(addr vma, len len[addr])
    10  mprotect(addr vma, len len[addr], prot flags[mmap_prot])
    11  madvise(addr vma, len len[addr], advice flags[madvise_flags])
    12  mlock(addr vma, size len[addr])
    13  munlock(addr vma, size len[addr])
    14  mlockall(flags flags[mlockall_flags])
    15  munlockall()
    16  
    17  mmap_prot = PROT_EXEC, PROT_READ, PROT_WRITE, PROT_NONE
    18  mmap_flags = MAP_ANON, MAP_FILE, MAP_FIXED, MAP_HASSEMAPHORE, MAP_INHERIT, MAP_TRYFIXED, MAP_WIRED, MAP_PRIVATE, MAP_SHARED
    19  madvise_flags = MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED, MADV_FREE
    20  mlockall_flags = MCL_CURRENT, MCL_FUTURE
    21  
    22  define MAP_ANONYMOUS	MAP_ANON