userfaultfd.h (e1fe27a208d565bb4f52127e7d9f4fea911e0d94) | userfaultfd.h (d4083f50e021f52addd02c9f83465937f8486556) |
---|---|
1/* 2 * include/linux/userfaultfd.h 3 * 4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org> 5 * Copyright (C) 2015 Red Hat, Inc. 6 * 7 */ 8 --- 9 unchanged lines hidden (view full) --- 18 * means the userland is reading). 19 */ 20#define UFFD_API ((__u64)0xAA) 21#define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK | \ 22 UFFD_FEATURE_EVENT_REMAP | \ 23 UFFD_FEATURE_EVENT_REMOVE | \ 24 UFFD_FEATURE_EVENT_UNMAP | \ 25 UFFD_FEATURE_MISSING_HUGETLBFS | \ | 1/* 2 * include/linux/userfaultfd.h 3 * 4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org> 5 * Copyright (C) 2015 Red Hat, Inc. 6 * 7 */ 8 --- 9 unchanged lines hidden (view full) --- 18 * means the userland is reading). 19 */ 20#define UFFD_API ((__u64)0xAA) 21#define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK | \ 22 UFFD_FEATURE_EVENT_REMAP | \ 23 UFFD_FEATURE_EVENT_REMOVE | \ 24 UFFD_FEATURE_EVENT_UNMAP | \ 25 UFFD_FEATURE_MISSING_HUGETLBFS | \ |
26 UFFD_FEATURE_MISSING_SHMEM) | 26 UFFD_FEATURE_MISSING_SHMEM | \ 27 UFFD_FEATURE_SIGBUS | \ 28 UFFD_FEATURE_THREAD_ID) |
27#define UFFD_API_IOCTLS \ 28 ((__u64)1 << _UFFDIO_REGISTER | \ 29 (__u64)1 << _UFFDIO_UNREGISTER | \ 30 (__u64)1 << _UFFDIO_API) 31#define UFFD_API_RANGE_IOCTLS \ 32 ((__u64)1 << _UFFDIO_WAKE | \ 33 (__u64)1 << _UFFDIO_COPY | \ 34 (__u64)1 << _UFFDIO_ZEROPAGE) --- 38 unchanged lines hidden (view full) --- 73 __u8 reserved1; 74 __u16 reserved2; 75 __u32 reserved3; 76 77 union { 78 struct { 79 __u64 flags; 80 __u64 address; | 29#define UFFD_API_IOCTLS \ 30 ((__u64)1 << _UFFDIO_REGISTER | \ 31 (__u64)1 << _UFFDIO_UNREGISTER | \ 32 (__u64)1 << _UFFDIO_API) 33#define UFFD_API_RANGE_IOCTLS \ 34 ((__u64)1 << _UFFDIO_WAKE | \ 35 (__u64)1 << _UFFDIO_COPY | \ 36 (__u64)1 << _UFFDIO_ZEROPAGE) --- 38 unchanged lines hidden (view full) --- 75 __u8 reserved1; 76 __u16 reserved2; 77 __u32 reserved3; 78 79 union { 80 struct { 81 __u64 flags; 82 __u64 address; |
83 union { 84 __u32 ptid; 85 } feat; |
|
81 } pagefault; 82 83 struct { 84 __u32 ufd; 85 } fork; 86 87 struct { 88 __u64 from; --- 59 unchanged lines hidden (view full) --- 148 * kernel in the uffdio_api.features if the kernel supports 149 * it, so userland can later check if the feature flag is 150 * present in uffdio_api.features after UFFDIO_API 151 * succeeded. 152 * 153 * UFFD_FEATURE_MISSING_SHMEM works the same as 154 * UFFD_FEATURE_MISSING_HUGETLBFS, but it applies to shmem 155 * (i.e. tmpfs and other shmem based APIs). | 86 } pagefault; 87 88 struct { 89 __u32 ufd; 90 } fork; 91 92 struct { 93 __u64 from; --- 59 unchanged lines hidden (view full) --- 153 * kernel in the uffdio_api.features if the kernel supports 154 * it, so userland can later check if the feature flag is 155 * present in uffdio_api.features after UFFDIO_API 156 * succeeded. 157 * 158 * UFFD_FEATURE_MISSING_SHMEM works the same as 159 * UFFD_FEATURE_MISSING_HUGETLBFS, but it applies to shmem 160 * (i.e. tmpfs and other shmem based APIs). |
161 * 162 * UFFD_FEATURE_SIGBUS feature means no page-fault 163 * (UFFD_EVENT_PAGEFAULT) event will be delivered, instead 164 * a SIGBUS signal will be sent to the faulting process. 165 * 166 * UFFD_FEATURE_THREAD_ID pid of the page faulted task_struct will 167 * be returned, if feature is not requested 0 will be returned. |
|
156 */ 157#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) 158#define UFFD_FEATURE_EVENT_FORK (1<<1) 159#define UFFD_FEATURE_EVENT_REMAP (1<<2) 160#define UFFD_FEATURE_EVENT_REMOVE (1<<3) 161#define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) 162#define UFFD_FEATURE_MISSING_SHMEM (1<<5) 163#define UFFD_FEATURE_EVENT_UNMAP (1<<6) | 168 */ 169#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) 170#define UFFD_FEATURE_EVENT_FORK (1<<1) 171#define UFFD_FEATURE_EVENT_REMAP (1<<2) 172#define UFFD_FEATURE_EVENT_REMOVE (1<<3) 173#define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) 174#define UFFD_FEATURE_MISSING_SHMEM (1<<5) 175#define UFFD_FEATURE_EVENT_UNMAP (1<<6) |
176#define UFFD_FEATURE_SIGBUS (1<<7) 177#define UFFD_FEATURE_THREAD_ID (1<<8) |
|
164 __u64 features; 165 166 __u64 ioctls; 167}; 168 169struct uffdio_range { 170 __u64 start; 171 __u64 len; --- 48 unchanged lines hidden --- | 178 __u64 features; 179 180 __u64 ioctls; 181}; 182 183struct uffdio_range { 184 __u64 start; 185 __u64 len; --- 48 unchanged lines hidden --- |