Skip to content

hostmem-file: reject invalid pmem file sizes

Stefan Hajnoczi 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 11 repliesIn review
  2. v21 patch 4 repliesSuperseded
  3. v11 patch 3 repliesSuperseded

Changes in v3 from the cover letter

* Added Patch 1 by Igor [Wei]
* Moved pmem size check after mem_path check [Wei]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hostmem: simplify ifdef-s in file_backend_memory_alloc()backends/hostmem-file.c+4 -55 replies
2/2hostmem-file: reject invalid pmem file sizesbackends/hostmem-file.c include/qemu/osdep.h util/oslib-posix.c +1 more+94 -05 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.

PatchWei YangPankaj GuptaIgor Mammedov
SeriesR-b
1/2R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/2] hostmem-file: reject invalid pmem file sizes

v3:
* Added Patch 1 by Igor [Wei]
* Moved pmem size check after mem_path check [Wei]

Guests started with NVDIMMs larger than the underlying host file produce confusing errors inside the guest. This happens because the guest accesses pages beyond the end of the file.

Check the pmem file size on startup and print a clear error message if the size is invalid.

Igor Mammedov (1):
hostmem: simplify ifdef-s in file_backend_memory_alloc()

Stefan Hajnoczi (1):
hostmem-file: reject invalid pmem file sizes

 include/qemu/osdep.h    | 13 ++++++++++
 backends/hostmem-file.c | 32 +++++++++++++++++++++----
 util/oslib-posix.c      | 53 +++++++++++++++++++++++++++++++++++++++++
 util/oslib-win32.c      |  5 ++++
 4 files changed, 98 insertions(+), 5 deletions(-)
Signature · 1 line
2.20.1