qemu-e2k/hw/ppc
Peter Maydell fb6971c110 hw/ppc/ppc405_uc.c: Avoid integer overflows
When performing clock calculations, the ppc405_uc code
has several places where it multiplies together two
32-bit variables and assigns the result to a 64-bit
variable. This doesn't quite do what is intended because
C will compute a 32-bit multiply result. Add casts to
ensure we don't truncate the result.

(Spotted by Coverity, CID 1005504, 1005505.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-02-22 14:28:53 +11:00
..
e500-ccsr.h
e500.c target-ppc: Add MMU model check for booke machines 2017-02-02 09:30:06 +11:00
e500.h
e500plat.c
fdt.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
mac_newworld.c mac99: replace debug printf with trace points 2017-02-22 11:28:28 +11:00
mac_oldworld.c hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
mac.h
Makefile.objs prep: add IBM RS/6000 7020 (40p) memory controller 2017-01-31 10:10:13 +11:00
mpc8544_guts.c
mpc8544ds.c
pnv_core.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
pnv_lpc.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
pnv_xscom.c kvm: move cpu synchronization code 2017-01-19 22:07:46 +01:00
pnv.c hw/ppc/pnv: Remove superfluous "qemu" prefix from error strings 2017-02-22 11:28:27 +11:00
ppc4xx_devs.c
ppc4xx_pci.c ppc4xx: replace debug printf with trace points 2017-02-22 11:28:28 +11:00
ppc405_boards.c
ppc405_uc.c hw/ppc/ppc405_uc.c: Avoid integer overflows 2017-02-22 14:28:53 +11:00
ppc405.h
ppc440_bamboo.c target-ppc: Add MMU model check for booke machines 2017-02-02 09:30:06 +11:00
ppc_booke.c ppc: Prevent inifnite loop in decrementer auto-reload. 2017-01-31 10:10:14 +11:00
ppc.c spapr: clock should count only if vm is running 2017-01-31 10:10:14 +11:00
ppce500_spin.c hw/ppc: QOM'ify ppce500_spin.c 2017-01-31 10:10:13 +11:00
prep_systemio.c prep: add PReP System I/O 2017-01-31 10:10:13 +11:00
prep.c hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
rs6000_mc.c prep: add IBM RS/6000 7020 (40p) memory controller 2017-01-31 10:10:13 +11:00
spapr_cpu_core.c spapr: move spapr_core_[foo]plug() callbacks close to machine code in spapr.c 2017-02-22 11:28:27 +11:00
spapr_drc.c hw: Fix typos found by codespell 2017-01-24 23:26:52 +03:00
spapr_events.c
spapr_hcall.c ppc: Add ppc_set_compat_all() 2017-01-31 10:10:14 +11:00
spapr_iommu.c
spapr_ovec.c spapr: replace debug printf with trace points 2017-02-22 11:28:28 +11:00
spapr_pci_vfio.c
spapr_pci.c
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c report guest crash information in GUEST_PANICKED event 2017-02-16 15:30:49 +01:00
spapr_rtc.c
spapr_vio.c hw/ppc: QOM'ify spapr_vio.c 2017-01-31 10:10:13 +11:00
spapr.c hw/ppc/spapr: Check for valid page size when hot plugging memory 2017-02-22 14:28:53 +11:00
trace-events spapr: replace debug printf with trace points 2017-02-22 11:28:28 +11:00
virtex_ml507.c target-ppc: Add MMU model check for booke machines 2017-02-02 09:30:06 +11:00