qemu-e2k/hw
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
..
9pfs
acpi acpihp: simplify acpi_pcihp_disable_root_bus 2022-01-07 19:30:13 -05:00
adc
alpha
arm hw/arm: add control knob to disable kaslr_seed via DTB 2022-01-18 16:42:42 +00:00
audio hw/audio/intel-hda: fix stream reset 2022-01-13 10:47:52 +01:00
avr
block Block layer patches 2022-01-14 15:56:30 +00:00
char
core hw/elf_ops: clear uninitialized segment space 2022-01-20 09:09:37 +01:00
cpu
cris
display spice: Update QXLInterface for spice >= 0.15.0 2022-01-18 16:42:41 +00:00
dma hw/dma: sifive_pdma: permit 4/8-byte access size of PDMA registers 2022-01-08 15:46:09 +10:00
gpio
hppa
hyperv dma: Let dma_memory_map() take MemTxAttrs argument 2021-12-30 17:16:32 +01:00
i2c
i386 acpi: tpm: Add missing device identification objects 2022-01-07 19:30:13 -05:00
ide hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult 2022-01-18 12:56:29 +01:00
input ps2: Initial horizontal scroll support 2022-01-13 15:33:18 +01:00
intc hw/intc: sifive_plic: Cleanup remaining functions 2022-01-08 15:46:09 +10:00
ipack
ipmi
isa
m68k q800: fix segfault with invalid MacROM 2022-01-09 12:03:21 +01:00
mem
microblaze
mips hw/mips/jazz: Inline vga_mmio_init() and remove it 2022-01-13 10:58:54 +01:00
misc dma: Let dma_memory_read/write() take MemTxAttrs argument 2021-12-30 17:16:32 +01:00
net Revert "virtio: introduce macro IRTIO_CONFIG_IRQ_IDX" 2022-01-10 16:02:54 -05:00
nios2
nubus
nvme hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult 2022-01-18 12:56:29 +01:00
nvram hw/nvram: Restrict fw_cfg QOM interface to sysemu and tools 2022-01-18 10:45:35 +01:00
openrisc
pci pcie_aer: Don't trigger a LSI if none are defined 2022-01-07 05:19:55 -05:00
pci-bridge
pci-host ppc/pnv: Remove PHB4 version property 2022-01-18 12:56:31 +01:00
pcmcia
ppc ppc/pnv: Introduce user creatable pnv-phb4 devices 2022-01-12 11:28:27 +01:00
rdma hw/dma: Use dma_addr_t type definition when relevant 2022-01-18 12:56:29 +01:00
remote
riscv hw/riscv: Use error_fatal for SoC realisation 2022-01-08 15:46:09 +10:00
rtc
rx
s390x s390x/ipl: support extended kernel command line size 2022-01-18 14:50:43 +01:00
scsi trivial patches pull request 20220118 2022-01-18 22:27:13 +00:00
sd hw/sd: Add SDHC support for SD card SPI-mode 2022-01-04 08:50:28 +01:00
sensor
sh4
smbios smbios: Rename SMBIOS_ENTRY_POINT_* enums 2022-01-07 05:19:55 -05:00
sparc
sparc64
ssi
timer hw/timer/etraxfs_timer: Add vmstate for ETRAX timers 2022-01-18 12:32:16 +01:00
tpm
tricore
usb uas: add missing return 2022-01-13 10:58:05 +01:00
vfio
virtio virtio: unify dataplane and non-dataplane ->handle_output() 2022-01-12 17:09:39 +00:00
watchdog
xen aio-posix: split poll check from ready handler 2022-01-12 17:09:39 +00:00
xenpv
xtensa
Kconfig
meson.build