hw/timer/renesas_tmr: Fix use of uninitialized data
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/timer/renesas_tmr: Prefix constants for CSS values with CSS_hw/ | +8 | 1 reply | |
| 2/2 | hw/timer/renesas_tmr: Fix use of uninitialized data in read_tcnt()hw/ | +15 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Philippe Mathieu-Daudé |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] hw/timer/renesas_tmr: Fix use of uninitialized data
This patchseries fixes a use-of-uninitialized-data spotted by Coverity (CID 1429976).
Patch 1 just tweaks some constant names for values of the TCCR.CSS register field, since patch 2 needs to add some more defines for the other possible values of the field.
Patch 2 is the bugfix proper; the use-uninitialized happens if the guest programs TCCR.CSS to values which are either prohibited in the h/w datasheet, or valid but corresponding to behaviour not currently implemented by QEMU. (Yes, I could have added LOG_UNIMP and/or LOG_GUEST_ERROR when the TCCR is written by the guest; it didn't really seem worth the effort to me.)
thanks
-- PMM
Peter Maydell (2):
hw/timer/renesas_tmr: Prefix constants for CSS values with CSS_ hw/timer/renesas_tmr: Fix use of uninitialized data in read_tcnt()
hw/timer/renesas_tmr.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-)
Signature · 1 line
2.20.1