github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/freebsd/posix_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, offset fileoff) 8 munmap(addr vma, len len[addr]) 9 mprotect(addr vma, len len[addr], prot flags[mmap_prot]) 10 msync(addr vma, len len[addr], f flags[msync_flags]) 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 18 msync_flags = MS_ASYNC, MS_SYNC, MS_INVALIDATE 19 mmap_flags = MAP_SHARED, MAP_PRIVATE, MAP_32BIT, MAP_ANONYMOUS, MAP_FILE, MAP_FIXED, MAP_STACK 20 madvise_flags = MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED, MADV_FREE, MADV_NOSYNC, MADV_AUTOSYNC, MADV_NOCORE, MADV_CORE, MADV_PROTECT 21 mlockall_flags = MCL_CURRENT, MCL_FUTURE 22 23 define MAP_ANONYMOUS MAP_ANON