aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2024-04-18 14:19:05 -0700
committerChristopher Ferris <cferris@google.com>2024-04-18 14:19:05 -0700
commit564b2cc488a7573926b5afc1fcdf71e964c59bfd (patch)
tree026621dbdfab96e37fb476e187ad4fc2b0ba0530
parente046b0f8a77256b16ca675b67b064d45140b083f (diff)
downloadlinux-kselftest-564b2cc488a7573926b5afc1fcdf71e964c59bfd.tar.gz
Only test UFFDIO_MOVE on 6.8 kernels or newer.
Bug: 335674702 Test: atest vts_linux_kselftest_x86_64 Change-Id: I3e5ab46747dd32718aad2ef776d89040317472a7
-rw-r--r--tools/testing/selftests/vm/userfaultfd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c
index c22127e72a3c..0899acd62111 100644
--- a/tools/testing/selftests/vm/userfaultfd.c
+++ b/tools/testing/selftests/vm/userfaultfd.c
@@ -411,6 +411,8 @@ static inline uint64_t uffd_minor_feature(void)
/* b/308714445
* _UFFDIO_POISON unsupported in kernel <6.6
+ * b/335674702
+ * _UFFDIO_MOVE unupported in kernel <6.8
*/
static uint32_t get_kernel_version(void)
{
@@ -444,6 +446,10 @@ static uint64_t get_expected_ioctls(uint64_t mode)
// UFFDIO_POISON not supported until kernel 6.6.
ioctls &= ~(1 << _UFFDIO_POISON);
}
+ if (kernel_version < KERNEL_VERSION(6, 8, 0)) {
+ // UFFDIO_MOVE not supported until kernel 6.8.
+ ioctls &= ~(1 << _UFFDIO_MOVE);
+ }
return ioctls;
}