summaryrefslogtreecommitdiff
path: root/src/xlat
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2021-02-20 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2021-02-20 08:00:00 +0000
commit7074aba4a9ba8118724ce77b457afab9030416b0 (patch)
tree64f9699f0c040910b87f1d0b64c1bb1c46aeaa33 /src/xlat
parenta8f691c07a20fca34f7acdb33ed6430364306acb (diff)
downloadstrace-7074aba4a9ba8118724ce77b457afab9030416b0.tar.gz
Switch to use bundled <linux/userfaultfd.h>
* bundled/linux/include/uapi/linux/userfaultfd.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/userfaultfd.h. * src/userfaultfd.c [!HAVE_LINUX_USERFAULTFD_H]: Remove. * src/ioctl.c: Likewise. * src/xlat/uffd_api_features.in: Add #unconditional, remove fallback definitions. * src/xlat/uffd_flags.in: Likewise. * src/xlat/uffd_api_flags.in: Add #unconditional. * src/xlat/uffd_copy_flags.in: Likewise. * src/xlat/uffd_register_ioctl_flags.in: Likewise. * src/xlat/uffd_register_mode_flags.in: Likewise. * src/xlat/uffd_zeropage_flags.in: Likewise. * tests/ioctl_uffdio.c: Include "kernel_fcntl.h" instead of <fcntl.h>. [!HAVE_LINUX_USERFAULTFD_H]: Remove.
Diffstat (limited to 'src/xlat')
-rw-r--r--src/xlat/uffd_api_features.in19
-rw-r--r--src/xlat/uffd_api_flags.in1
-rw-r--r--src/xlat/uffd_copy_flags.in5
-rw-r--r--src/xlat/uffd_flags.in3
-rw-r--r--src/xlat/uffd_register_ioctl_flags.in1
-rw-r--r--src/xlat/uffd_register_mode_flags.in1
-rw-r--r--src/xlat/uffd_zeropage_flags.in1
7 files changed, 19 insertions, 12 deletions
diff --git a/src/xlat/uffd_api_features.in b/src/xlat/uffd_api_features.in
index 33d644778..603086f9c 100644
--- a/src/xlat/uffd_api_features.in
+++ b/src/xlat/uffd_api_features.in
@@ -1,10 +1,11 @@
+#unconditional
#val_type uint64_t
-UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
-UFFD_FEATURE_EVENT_FORK (1<<1)
-UFFD_FEATURE_EVENT_REMAP (1<<2)
-UFFD_FEATURE_EVENT_REMOVE (1<<3)
-UFFD_FEATURE_MISSING_HUGETLBFS (1<<4)
-UFFD_FEATURE_MISSING_SHMEM (1<<5)
-UFFD_FEATURE_EVENT_UNMAP (1<<6)
-UFFD_FEATURE_SIGBUS (1<<7)
-UFFD_FEATURE_THREAD_ID (1<<8)
+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
+UFFD_FEATURE_SIGBUS
+UFFD_FEATURE_THREAD_ID
diff --git a/src/xlat/uffd_api_flags.in b/src/xlat/uffd_api_flags.in
index fd210872b..66b968959 100644
--- a/src/xlat/uffd_api_flags.in
+++ b/src/xlat/uffd_api_flags.in
@@ -1,3 +1,4 @@
+#unconditional
#val_type uint64_t
1<<_UFFDIO_REGISTER
1<<_UFFDIO_UNREGISTER
diff --git a/src/xlat/uffd_copy_flags.in b/src/xlat/uffd_copy_flags.in
index a9e3e9416..362b20761 100644
--- a/src/xlat/uffd_copy_flags.in
+++ b/src/xlat/uffd_copy_flags.in
@@ -1,3 +1,4 @@
+#unconditional
#val_type uint64_t
-UFFDIO_COPY_MODE_DONTWAKE (1ULL<<0)
-UFFDIO_COPY_MODE_WP (1ULL<<1)
+UFFDIO_COPY_MODE_DONTWAKE
+UFFDIO_COPY_MODE_WP
diff --git a/src/xlat/uffd_flags.in b/src/xlat/uffd_flags.in
index e925a8fe7..7a68a695d 100644
--- a/src/xlat/uffd_flags.in
+++ b/src/xlat/uffd_flags.in
@@ -1,3 +1,4 @@
-UFFD_USER_MODE_ONLY 1
+#unconditional
+UFFD_USER_MODE_ONLY
O_NONBLOCK
O_CLOEXEC
diff --git a/src/xlat/uffd_register_ioctl_flags.in b/src/xlat/uffd_register_ioctl_flags.in
index 077871f93..6d04ca3be 100644
--- a/src/xlat/uffd_register_ioctl_flags.in
+++ b/src/xlat/uffd_register_ioctl_flags.in
@@ -1,3 +1,4 @@
+#unconditional
#val_type uint64_t
1<<_UFFDIO_WAKE
1<<_UFFDIO_COPY
diff --git a/src/xlat/uffd_register_mode_flags.in b/src/xlat/uffd_register_mode_flags.in
index 996b1f32e..adae3c64a 100644
--- a/src/xlat/uffd_register_mode_flags.in
+++ b/src/xlat/uffd_register_mode_flags.in
@@ -1,3 +1,4 @@
+#unconditional
#val_type uint64_t
UFFDIO_REGISTER_MODE_MISSING
UFFDIO_REGISTER_MODE_WP
diff --git a/src/xlat/uffd_zeropage_flags.in b/src/xlat/uffd_zeropage_flags.in
index 6d48a040d..b2b3467ba 100644
--- a/src/xlat/uffd_zeropage_flags.in
+++ b/src/xlat/uffd_zeropage_flags.in
@@ -1,2 +1,3 @@
+#unconditional
#val_type uint64_t
UFFDIO_ZEROPAGE_MODE_DONTWAKE