qemu-e2k/softmmu
Richard Henderson 418ade7849 softmmu: Always initialize xlat in address_space_translate_for_iotlb
The bug is an uninitialized memory read, along the translate_fail
path, which results in garbage being read from iotlb_to_section,
which can lead to a crash in io_readx/io_writex.

The bug may be fixed by writing any value with zero
in ~TARGET_PAGE_MASK, so that the call to iotlb_to_section using
the xlat'ed address returns io_mem_unassigned, as desired by the
translate_fail path.

It is most useful to record the original physical page address,
which will eventually be logged by memory_region_access_valid
when the access is rejected by unassigned_mem_accepts.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1065
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220621153829.366423-1-richard.henderson@linaro.org>
2022-06-21 09:26:16 -07:00
..
arch_init.c
balloon.c
bootdevice.c machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
cpu-throttle.c
cpu-timers.c
cpus.c
datadir.c
device_tree.c
dma-helpers.c
globals.c ui: Switch "-display sdl" to use the QAPI parser 2022-06-03 08:03:28 +02:00
icount.c replay: rewrite async event handling 2022-06-06 09:26:53 +02:00
ioport.c
main.c
memory_mapping.c
memory.c
meson.build
physmem.c softmmu: Always initialize xlat in address_space_translate_for_iotlb 2022-06-21 09:26:16 -07:00
qdev-monitor.c qdev: unplug blocker for devices 2022-06-15 14:50:41 +01:00
qemu-seccomp.c
qtest.c
rtc.c
runstate-action.c
runstate.c
timers-state.h
tpm.c
trace-events
trace.h
vl.c hw/cxl: Push linking of CXL targets into i386/pc rather than in machine.c 2022-06-09 19:32:49 -04:00