mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-27 21:30:33 +00:00
3d5e81e280
This is mostly copied form linux. We probably need better support for sharing descriptions between multiple OSes. But there are lots of differences, so this is not trivial.
22 lines
945 B
Plaintext
22 lines
945 B
Plaintext
# Copyright 2017 syzkaller project authors. All rights reserved.
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
include <sys/types.h>
|
|
include <sys/mman.h>
|
|
|
|
mmap(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd, offset fileoff) vma
|
|
munmap(addr vma, len len[addr])
|
|
mprotect(addr vma, len len[addr], prot flags[mmap_prot])
|
|
msync(addr vma, len len[addr], f flags[msync_flags])
|
|
madvise(addr vma, len len[addr], advice flags[madvise_flags])
|
|
mlock(addr vma, size len[addr])
|
|
munlock(addr vma, size len[addr])
|
|
mlockall(flags flags[mlockall_flags])
|
|
munlockall()
|
|
|
|
mmap_prot = PROT_EXEC, PROT_READ, PROT_WRITE
|
|
msync_flags = MS_ASYNC, MS_SYNC, MS_INVALIDATE
|
|
mmap_flags = MAP_SHARED, MAP_PRIVATE, MAP_32BIT, MAP_ANON, MAP_FILE, MAP_FIXED, MAP_STACK
|
|
madvise_flags = MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED
|
|
mlockall_flags = MCL_CURRENT, MCL_FUTURE
|