summary refs log tree commit diff stats
path: root/hw/i2c/mpc_i2c.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2019-03-06 14:15:26 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-03-12 14:33:04 +1100
commite075623aa517b0690ec978772df008d7e00ebce5 (patch)
treed0b587c2cfa1e04bb07f10ea4b2976bcd55d6a6d /hw/i2c/mpc_i2c.c
parent176dcceedd084bc2db0a3e92123e2cfb453336e7 (diff)
downloadfocaccia-qemu-e075623aa517b0690ec978772df008d7e00ebce5.tar.gz
focaccia-qemu-e075623aa517b0690ec978772df008d7e00ebce5.zip
spapr: Force SPAPR_MEMORY_BLOCK_SIZE to be a hwaddr (64-bit)
SPAPR_MEMORY_BLOCK_SIZE is logically a difference in memory addresses, and
hence of type hwaddr which is 64-bit.  Previously it wasn't marked as such
which means that it could be treated as 32-bit.  That will work in some
circumstances but if multiplied by another 32-bit value it could lead to
a 32-bit overflow and an incorrect result.

One specific instance of this in spapr_lmb_dt_populate() was spotted by
Coverity (CID 1399145).

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/i2c/mpc_i2c.c')
0 files changed, 0 insertions, 0 deletions