xen/privcmd: prevent page migration for hypercall buffers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 8 repliesIn review
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Addressed Jan's feedback for #2 (see patch for details).
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | xen/prvicmd: use ENOTTY if the IOCTL is not supporteddrivers/ | +1 | 1 reply | |
| 2/2 | xen/privcmd: add ioctls for locking/unlocking hypercall buffersdrivers/ include/ | +254 | 4 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Jan Beulich | Juergen Gross |
|---|---|---|
| Series | A-b | |
| 1/2 | R-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHv2 0/2] xen/privcmd: prevent page migration for hypercall buffers
Currently libxencall using mlocked buffers for hypercall buffers. This pages are subject to compaction and page migration. A userspace process may see a hypercall fail with -EFAULT if a page backing a hypercall buffer is in the process of being migrated.
Page migration can be prevented by taking an additional reference to the page.
There are three possible ways to do this:
1. Add a new device which when mmap()'d populated the VMA with suitable memory that has an additional reference. This would give VMAs that have appropriate properties set (e.g., VM_DONTCOPY) without having to do additional madvise() calls.
2. Add a new ioctl to privcmd to populate a VMA with suitably ref-counted pages. However, mmap() on privcmd is already used for foreign mappings and the VMA properties for hypercall buffers and foreign mappings might need to be different and the handling of unmap will need to be different. This might be tricky.
3. Add a pair of ioctls to privcmd to lock/unlock a buffer by getting/putting an additional reference to the page. This is what's implemented in this series.
Any thoughts on which is the best approach?
Changes in v2:
- Addressed Jan's feedback for #2 (see patch for details).
David
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel