diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-03-02 11:27:48 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-03-05 12:10:27 +0100 |
| commit | db01d57e9144125b368d14815d08e897ff496604 (patch) | |
| tree | 54a3af216c4317d1c90563f1bd6dd1c05bfc1e8d /sys/linux/uffd.txt | |
| parent | e28ba02d9d2629777471299fe5d5ca6adbb7bc6b (diff) | |
sys/linux: a bunch of assorted improvements and fixes
Diffstat (limited to 'sys/linux/uffd.txt')
| -rw-r--r-- | sys/linux/uffd.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sys/linux/uffd.txt b/sys/linux/uffd.txt new file mode 100644 index 000000000..239c7aefa --- /dev/null +++ b/sys/linux/uffd.txt @@ -0,0 +1,52 @@ +# Copyright 2018 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 <linux/userfaultfd.h> + +resource fd_uffd[fd] + +userfaultfd(flags flags[userfaultfd_flags]) fd_uffd + +ioctl$UFFDIO_API(fd fd_uffd, cmd const[UFFDIO_API], arg ptr[in, uffdio_api]) +ioctl$UFFDIO_REGISTER(fd fd_uffd, cmd const[UFFDIO_REGISTER], arg ptr[in, uffdio_register]) +ioctl$UFFDIO_UNREGISTER(fd fd_uffd, cmd const[UFFDIO_UNREGISTER], arg ptr[in, uffdio_range]) +ioctl$UFFDIO_WAKE(fd fd_uffd, cmd const[UFFDIO_WAKE], arg ptr[in, uffdio_range]) +ioctl$UFFDIO_COPY(fd fd_uffd, cmd const[UFFDIO_COPY], arg ptr[in, uffdio_range]) +ioctl$UFFDIO_ZEROPAGE(fd fd_uffd, cmd const[UFFDIO_ZEROPAGE], arg ptr[in, uffdio_range]) + +userfaultfd_flags = O_NONBLOCK, O_CLOEXEC +uffdio_register_mode = UFFDIO_REGISTER_MODE_MISSING, UFFDIO_REGISTER_MODE_WP +uffdio_copy_mode = UFFDIO_COPY_MODE_DONTWAKE +uffdio_zero_mode = UFFDIO_ZEROPAGE_MODE_DONTWAKE +uffdio_features = UFFD_FEATURE_PAGEFAULT_FLAG_WP, UFFD_FEATURE_EVENT_FORK, UFFD_FEATURE_EVENT_REMAP, UFFD_FEATURE_EVENT_REMOVE, UFFD_FEATURE_MISSING_HUGETLBFS, UFFD_FEATURE_MISSING_SHMEM, UFFD_FEATURE_EVENT_UNMAP + +uffdio_api { + api const[UFFD_API, int64] + featur flags[uffdio_features, int64] + ioctls const[0, int64] +} + +uffdio_range { + start vma + len len[start, int64] +} + +uffdio_register { + range uffdio_range + mode flags[uffdio_register_mode, int64] + ioctls const[0, int64] +} + +uffdio_copy { + dst vma + src vma + len len[dst, int64] + mode flags[uffdio_copy_mode, int64] + copy const[0, int64] +} + +uffdio_zeropage { + range uffdio_range + mode flags[uffdio_zero_mode, int64] + zeropg const[0, int64] +} |
