Skip to content

util/userfaultfd: Support /dev/userfaultfd

Peter Xu qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v23 patches 8 repliesSuperseded
  3. v13 patches 19 repliesSuperseded

Changes in v3 from the cover letter

- Remove __linux__ macro check in util/userfaultfd.c [Juan]
- Avoid using globals, merge functions [Juan]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2linux-headers: Update to v6.1include/standard-headers/drm/drm_fourcc.h include/standard-headers/linux/ethtool.h include/standard-headers/linux/fuse.h +10 more+298 -202 replies
2/2util/userfaultfd: Support /dev/userfaultfdutil/trace-events util/userfaultfd.c+33 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchCornelia HuckJuan Quintela
1/2A-b R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] util/userfaultfd: Support /dev/userfaultfd

To Juan: from what I observe on how to update the linux headers, I think it can simply be in a pull just like a normal patch.

The most recent change and its pull for reference:

https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/

Changelog:

v3:
- Remove __linux__ macro check in util/userfaultfd.c [Juan]
- Avoid using globals, merge functions [Juan]

v2:
- Added R-bs for Phil
- Move open_mode into uffd_detect_open_mode() [Phil]
- Document uffd_open() in the header file [Phil]
- [Discussed with Daniel/Michal, decided to leave fd support for later]

The new /dev/userfaultfd handle is superior to the system call with a better permission control and also works for a restricted seccomp environment.

The new device was only introduced in v6.1 so we need a header update.

Please have a look, thanks.

Peter Xu (2):
linux-headers: Update to v6.1
util/userfaultfd: Support /dev/userfaultfd

 include/standard-headers/drm/drm_fourcc.h     |  34 ++++-
 include/standard-headers/linux/ethtool.h      |  63 +++++++-
 include/standard-headers/linux/fuse.h         |   6 +-
 .../linux/input-event-codes.h                 |   1 +
 include/standard-headers/linux/virtio_blk.h   |  19 +++
 linux-headers/asm-generic/hugetlb_encode.h    |  26 ++--
 linux-headers/asm-generic/mman-common.h       |   2 +
 linux-headers/asm-mips/mman.h                 |   2 +
 linux-headers/asm-riscv/kvm.h                 |   4 +
 linux-headers/linux/kvm.h                     |   1 +
 linux-headers/linux/psci.h                    |  14 ++
 linux-headers/linux/userfaultfd.h             |   4 +
 linux-headers/linux/vfio.h                    | 142 ++++++++++++++++++
 util/trace-events                             |   1 +
 util/userfaultfd.c                            |  32 ++++
 15 files changed, 331 insertions(+), 20 deletions(-)
Signature · 1 line
2.37.3