syzkaller/sys/openbsd/mm.txt
Greg Steuck 2f1090dacd sys/openbsd: added minherit, extended/simplified mmap
* sys/openbsd: added minherit, extended/simplified mmap.

Added a script from anton_at_openbsd.org for regenerating syscalls.

Generated by ksh ./sys/openbsd/extract-openbsd.sh

* Undo whitespace change not passing on CI

* No need for magic script.
2018-10-29 18:59:16 +01:00

22 lines
1.0 KiB
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, pad const[0], offset fileoff)
munmap(addr vma, len len[addr])
mprotect(addr vma, len len[addr], prot flags[mmap_prot])
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()
minherit(addr vma, len len[addr], inherit flags[inherit_flags])
mmap_prot = PROT_EXEC, PROT_READ, PROT_WRITE, PROT_NONE
mmap_flags = MAP_SHARED, MAP_PRIVATE, MAP_FIXED, MAP_ANONYMOUS, MAP_STACK, __MAP_NOFAULT, __MAP_NOREPLACE
madvise_flags = MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED, MADV_SPACEAVAIL, MADV_FREE
mlockall_flags = MCL_CURRENT, MCL_FUTURE
inherit_flags = MAP_INHERIT_NONE, MAP_INHERIT_COPY, MAP_INHERIT_SHARE, MAP_INHERIT_ZERO