Determine supported features using uffd_get_features

Import the uffd_get_features function from upstream to determine
supported features instead of relying on UFFD_API_FEATURES.

edliaw: backport to android14-tests-dev added the helper functions
directly to userfaultfd because vm_util wasn't present.

Bug: 331397584
Test: atest vts_linux_kselftest_x86_64:vm_userfaultfd_anon_x86_64
Test: atest vts_linux_kselftest_x86_64:vm_userfaultfd_shmem_x86_64
Signed-off-by: Edward Liaw <[email protected]>
(cherry picked from https://android-review.googlesource.com/q/commit:7db40d2768386646df7043770d3d0cae519d274a)
Merged-In: I4be07db0e19e5c633c3cf9c91bcc0f0d4f969136
Change-Id: I4be07db0e19e5c633c3cf9c91bcc0f0d4f969136
1 file changed