qemu-e2k/include/hw
Anastasia Belova 410c2a4d75 load_elf: fix iterator's type for elf file processing
j is used while loading an ELF file to byteswap segments'
data. If data is larger than 2GB an overflow may happen.
So j should be elf_word.

This commit fixes a minor bug: it's unlikely anybody is trying to
load ELF files with 2GB+ segments for wrong-endianness targets,
but if they did, it wouldn't work correctly.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Cc: qemu-stable@nongnu.org
Fixes: 7ef295ea5b ("loader: Add data swap option to load-elf")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-01-18 12:20:33 +00:00
..
acpi virtio,pc,pci: features, cleanups 2023-10-23 14:45:29 -07:00
adc
arm hw/arm: Connect STM32L4x5 SYSCFG to STM32L4x5 SoC 2024-01-15 17:12:22 +00:00
audio virtio-sound: implement audio output (TX) 2023-11-07 03:39:10 -05:00
block swim: update IWM/ISM register block decoding 2023-10-06 10:33:43 +02:00
char hw/char/stm32f2xx_usart: Add more definitions for CR1 register 2023-11-02 13:36:45 +00:00
core hw/core/cpu: Update description of CPUState::node 2024-01-05 16:20:15 +01:00
cpu
cris
cxl hw/cxl: spelling fixes: limitaions, potentialy, intialized 2023-11-15 11:09:17 +03:00
display ramfb: add migration support 2023-10-18 10:10:49 +02:00
dma
firmware
gpio
hyperv include/hw/hyperv/dynmem-proto.h: spelling fix: nunber, atleast 2023-11-15 12:06:05 +03:00
i2c hw/i2c: pmbus: add VCAP register 2023-11-07 13:08:49 +01:00
i386 hw: Add compat machines for 9.0 2023-12-20 10:29:23 +01:00
ide ide/pci: introduce pci_ide_update_mode() function 2023-11-21 12:45:21 +01:00
input hw/input/stellaris_gamepad: Convert to qemu_input_handler_register() 2023-11-02 12:52:06 +00:00
intc hw/intc/loongarch_extioi: Add dynamic cpu number support 2024-01-11 19:22:47 +08:00
ipack
ipmi
isa hw/isa/vt82c686: Bring back via_isa_set_irq() 2023-11-28 14:26:37 +01:00
loongarch hw/loongarch/virt: Set iocsr address space per-board rather than percpu 2024-01-11 19:22:47 +08:00
m68k q800: move dp8393x_prom memory region to Q800MachineState 2024-01-11 11:39:26 +01:00
mem memory-device: Support empty memory devices 2023-11-03 20:26:59 +01:00
mips hw/mips: Inline 'bios.h' definitions 2024-01-05 16:20:15 +01:00
misc hw/misc: Implement STM32L4x5 SYSCFG 2024-01-15 17:12:22 +00:00
net
nubus
nvram hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location 2024-01-10 18:47:46 +10:00
openrisc
pci hw/pci: Constify VMState 2023-12-30 07:38:06 +11:00
pci-bridge hw/cxl: Add a switch mailbox CCI function 2023-11-07 03:39:11 -05:00
pci-host hw/pci-host/gpex: Define properties for MMIO ranges 2024-01-10 18:47:47 +10:00
ppc hw/ppc/xive2_regs: Remove unnecessary 'cpu.h' inclusion 2024-01-05 16:20:15 +01:00
rdma
remote
riscv hw/riscv/virt: Update GPEX MMIO related properties 2024-01-10 18:47:47 +10:00
rtc
rx
s390x * Fix s390x CPU reconfiguration information in the SCLP facility map 2023-11-08 20:34:36 +08:00
scsi scsi: only access SCSIDevice->requests from one thread 2023-12-21 22:49:27 +01:00
sd
sensor
sh4
southbridge hw/isa/piix: Allow for optional PIT creation in PIIX3 2023-10-22 05:18:17 -04:00
sparc
ssi hw/misc, hw/ssi: Fix some URLs for AMD / Xilinx models 2023-11-27 15:38:43 +00:00
timer
tricore
usb
vfio vfio/iommufd: Introduce a VFIOIOMMU iommufd QOM interface 2024-01-05 21:25:20 +01:00
virtio hw/arm/virt-acpi-build.c: Migrate virtio creation to common location 2024-01-10 18:47:46 +10:00
watchdog
xen xen: fix condition for skipping virtio-mmio defines 2023-12-12 11:18:32 +01:00
xtensa
boards.h hw/core: Add machine_class_default_cpu_type() 2024-01-05 16:20:14 +01:00
clock.h
elf_ops.h load_elf: fix iterator's type for elf file processing 2024-01-18 12:20:33 +00:00
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h
loader.h hw/loader: Clean up global variable shadowing in rom_add_file() 2023-11-07 13:08:48 +01:00
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h
qdev-clock.h
qdev-core.h
qdev-dma.h
qdev-properties-system.h qdev: add IOThreadVirtQueueMappingList property type 2023-12-21 22:49:28 +01:00
qdev-properties.h qdev-properties: alias all object class properties 2023-12-21 22:49:28 +01:00
register.h
registerfields.h
resettable.h
stream.h
sysbus.h
usb.h
vmstate-if.h