qemu-e2k/util
Stefan Hajnoczi 314aec4a6e hostmem-file: reject invalid pmem file sizes
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.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1669053
Cc: Wei Yang <richardw.yang@linux.intel.com>
Cc: Zhang Yi <yi.z.zhang@linux.intel.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20190214031004.32522-3-stefanha@redhat.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Pankaj Gupta <pagupta@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-03-11 10:44:19 -03:00
..
Makefile.objs build-sys: link with slirp as an external project 2019-03-07 12:46:31 +01:00
aio-posix.c aio-posix: Assert that aio_poll() is always called in home thread 2019-02-25 15:03:19 +01:00
aio-wait.c block: Use a single global AioWait 2018-09-25 15:50:15 +02:00
aio-win32.c aio-posix: Fix concurrent aio_poll/set_fd_handler. 2019-01-14 14:09:41 +00:00
aiocb.c
async.c util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb 2018-09-25 15:50:15 +02:00
atomic64.c util: add atomic64 2018-10-02 18:47:55 +02:00
base64.c
bitmap.c
bitops.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
buffer.c
bufferiszero.c
cacheinfo.c util: add atomic64 2018-10-02 18:47:55 +02:00
compatfd.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c cutils: Fix qemu_strtosz() & friends to reject non-finite sizes 2018-12-13 19:10:06 +01:00
drm.c
envlist.c
error.c error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
event_notifier-posix.c
event_notifier-win32.c
fifo8.c
filemonitor-inotify.c util: add helper APIs for dealing with inotify in portable manner 2019-02-26 15:25:58 +00:00
filemonitor-stub.c util: add helper APIs for dealing with inotify in portable manner 2019-02-26 15:25:58 +00:00
getauxval.c
hbitmap.c Revert "hbitmap: Add @advance param to hbitmap_iter_next()" 2019-01-15 18:26:50 -05:00
hexdump.c
host-utils.c
id.c
iohandler.c
iov.c
iova-tree.c
keyval.c
lockcnt.c
log.c
main-loop.c slirp: move sources to src/ subdirectory 2019-03-07 12:46:31 +01:00
memfd.c hostmem-memfd: add checks before adding hostmem-memfd & properties 2018-10-02 18:47:55 +02:00
mmap-alloc.c mmap-alloc: fix hugetlbfs misaligned length in ppc64 2019-02-04 18:44:20 +11:00
module.c
notify.c
osdep.c slirp: prefer c99 types over BSD kind 2019-02-07 15:49:08 +02:00
oslib-posix.c hostmem-file: reject invalid pmem file sizes 2019-03-11 10:44:19 -03:00
oslib-win32.c hostmem-file: reject invalid pmem file sizes 2019-03-11 10:44:19 -03:00
pagesize.c
path.c
qdist.c
qemu-config.c
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c qemu-coroutine-sleep: drop CoSleepCB 2019-01-24 10:05:16 +00:00
qemu-coroutine.c block: Add missing locking in bdrv_co_drain_bh_cb() 2018-09-25 15:50:15 +02:00
qemu-error.c error: Drop bogus "use error_setg() instead" admonitions 2018-10-19 15:47:09 +02:00
qemu-openpty.c
qemu-option.c qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
qemu-progress.c
qemu-sockets.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
qemu-thread-common.h Clean up includes 2018-12-20 10:29:08 +01:00
qemu-thread-posix.c qemu-thread: Don't block SEGV, ILL and FPE 2019-01-08 12:34:46 +00:00
qemu-thread-win32.c build-sys: build with Vista API by default 2019-01-11 13:57:25 +01:00
qemu-timer-common.c
qemu-timer.c qemu-timer: avoid checkpoints for virtual clock timers in external subsystems 2018-10-19 13:44:03 +02:00
qht.c qht: constify arguments to some internal functions 2018-09-26 08:55:54 -07:00
qsp.c include: move exec/tb-hash-xx.h to qemu/xxhash.h 2018-12-17 06:04:44 +03:00
range.c Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
rcu.c
readline.c
stats64.c
sys_membarrier.c
systemd.c
thread-pool.c
throttle.c
timed-average.c
trace-events util: add helper APIs for dealing with inotify in portable manner 2019-02-26 15:25:58 +00:00
unicode.c
uri.c
uuid.c uuid: Make qemu_uuid_bswap() take and return a QemuUUID 2019-02-01 13:46:45 +01:00
vfio-helpers.c exec: Change RAMBlockIterFunc definition 2019-03-06 10:49:17 +00:00