qemu/hw/ufs
Minwoo Im e12b11f6f2 hw/ufs: Fix potential bugs in MMIO read|write
This patch fixes two points reported in coverity scan report [1].  Check
the MMIO access address with (addr + size), not just with the start offset
addr to make sure that the requested memory access not to exceed the
actual register region.  We also updated (uint8_t *) to (uint32_t *) to
represent we are accessing the MMIO registers by dword-sized only.

[1] https://lore.kernel.org/qemu-devel/CAFEAcA82L-WZnHMW0X+Dr40bHM-EVq2ZH4DG4pdqop4xxDP2Og@mail.gmail.com/

Cc: Jeuk Kim <jeuk20.kim@gmail.com>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20240623024555.78697-1-minwoo.im.dev@gmail.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
2024-06-30 12:44:32 +09:00
..
Kconfig
lu.c hw/ufs: Modify lu.c to share codes with SCSI subsystem 2023-10-30 10:28:04 +09:00
meson.build hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
trace-events hw/ufs: Add support MCQ of UFSHCI 4.0 2024-06-03 16:20:42 +09:00
trace.h
ufs.c hw/ufs: Fix potential bugs in MMIO read|write 2024-06-30 12:44:32 +09:00
ufs.h hw/ufs: Add support MCQ of UFSHCI 4.0 2024-06-03 16:20:42 +09:00