qemu/hw/core
Laurent Vivier b4c4c1f112 hw/elf_ops: clear uninitialized segment space
When the mem_size of the segment is bigger than the file_size,
and if this space doesn't overlap another segment, it needs
to be cleared.

This bug is very similar to the one we had for linux-user,
22d113b52f ("linux-user: Fix loading of BSS segments"),
where .bss section is encoded as an extension of the the data
one by setting the segment p_memsz > p_filesz.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
[PMD: Use recently added address_space_set()]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220115203725.3834712-3-laurent@vivier.eu>
2022-01-20 09:09:37 +01:00
..
bus.c
clock-vmstate.c
clock.c
cpu-common.c
cpu-sysemu.c
fw-path-provider.c
generic-loader.c dma: Let dma_memory_read/write() take MemTxAttrs argument 2021-12-30 17:16:32 +01:00
gpio.c hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter 2021-12-31 13:21:36 +01:00
guest-loader.c
guest-loader.h
hotplug-stubs.c
hotplug.c
irq.c
Kconfig
loader-fit.c
loader.c hw/elf_ops: clear uninitialized segment space 2022-01-20 09:09:37 +01:00
machine-hmp-cmds.c
machine-qmp-cmds.c
machine-smp.c hw/core/machine: Introduce CPU cluster topology support 2021-12-31 13:42:39 +01:00
machine.c machine: Use host_memory_backend_is_mapped() in machine_consume_memdev() 2022-01-18 10:45:35 +01:00
meson.build
nmi.c
null-machine.c
numa.c numa: Enable numa for SGX EPC sections 2021-12-10 09:47:18 +01:00
or-irq.c
platform-bus.c
ptimer.c
qdev-clock.c
qdev-fw.c
qdev-hotplug.c
qdev-prop-internal.h
qdev-properties-system.c
qdev-properties.c
qdev.c
register.c
reset.c
resettable.c
split-irq.c
stream.c
sysbus.c
trace-events
trace.h
uboot_image.h
vm-change-state-handler.c
vmstate-if.c