Commit 1840ee2
committed
userfaultfd05: require CONFIG_HAVE_ARCH_USERFAULTFD_WP
Kernels built without arch UFFD-WP support (CONFIG_HAVE_ARCH_USERFAULTFD_WP)
can report "WP unsupported" in different ways (e.g. UFFDIO_API
returns -1/EINVAL on some newer kernels, while others succeed but do not
advertise UFFD_FEATURE_PAGEFAULT_FLAG_WP in the returned features mask).
Rather than relying on runtime probing that varies across kernels,
require CONFIG_HAVE_ARCH_USERFAULTFD_WP=y via .needs_kconfigs and use
SAFE_IOCTL() for UFFDIO_API again.
Follow-up: 485a4cd ("userfaultfd05: allow TCONF when UFFD-WP is unsupported")
Signed-off-by: Li Wang <liwang@redhat.com>
Cc: Ricardo Branco <rbranco@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>1 parent d69695a commit 1840ee2
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 95 | | |
99 | | - | |
100 | | - | |
| 96 | + | |
101 | 97 | | |
102 | 98 | | |
103 | 99 | | |
| |||
128 | 124 | | |
129 | 125 | | |
130 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
0 commit comments