Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7101

RFE: Prefer /dev/userfaultfd over userfaultfd(2) syscall

    • libvirt-10.3.0-1.el9
    • sst_virtualization
    • ssg_virtualization
    • 16
    • 2
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • OpenShift Virtualization
    • None
    • Enhancement
    • Hide
      .`/dev/userfaultfd` provides enhancement over the `userfaultfd(2)` system call

      The `/dev/userfaultfd` device is an alternative to the `userfaultfd` system call and an entry point for post-copy migration functionality providing access control even for unprivileged processes. Previously, the `vm.unprivileged_userfaultfd` sysctl command controlled system calls that granted access to either all or no unprivileged processes on the host. With this enhancement, in the default configuration, `libvirt` automatically uses the `/dev/userfaultfd` device functionality instead of setting the `vm.unprivileged_userfaultfd` sysctl command.
      Show
      .`/dev/userfaultfd` provides enhancement over the `userfaultfd(2)` system call The `/dev/userfaultfd` device is an alternative to the `userfaultfd` system call and an entry point for post-copy migration functionality providing access control even for unprivileged processes. Previously, the `vm.unprivileged_userfaultfd` sysctl command controlled system calls that granted access to either all or no unprivileged processes on the host. With this enhancement, in the default configuration, `libvirt` automatically uses the `/dev/userfaultfd` device functionality instead of setting the `vm.unprivileged_userfaultfd` sysctl command.
    • Done
    • All
    • 10.1.0
    • None

      +++ This bug was initially created as a clone of Bug #2158704 +++

      Description of problem:
      So far, for postcopy migration the userfaultfd(2) syscall is used. But this has couple of drawbacks (which are summarized nicely in kernel commit [1]). To resolve these, kernel came up with /dev/userfaultfd device, and this is a request to switch to that.

      Please note, some scenarios where QEMU is running might be disallowing the userfaultfd(2) syscall as it is viewed as too powerful. For intsance KubeVirt [2].

      1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d5de004e009add27db76c5cdc9f1f7f7dc087e7

      2: https://issues.redhat.com/browse/OCPBUGS-5031

            jdenemar@redhat.com Jiri Denemark
            mprivozn@redhat.com Michal Privoznik
            Liping Cheng
            Jiri Denemark Jiri Denemark
            Luyao Huang Luyao Huang
            Mayur Patil Mayur Patil
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: