Skip to content

Hexagon: Fix undefined behavior bugs

Brian Cain qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v22 patches 3 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/hexagon: assert qfloat shifttarget/hexagon/mmvec/hvx_qfloat.c+5 -00 replies
2/3target/hexagon: reset implicit USR write statetarget/hexagon/translate.c+1 -00 replies
3/3target/hexagon: avoid negative slot shifttarget/hexagon/decode.c+4 -12 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPierrick BouvierPhilippe Mathieu-Daudé
1/3R-b
2/3R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Hexagon: Fix undefined behavior bugs

Coverity reported an undefined behavior issue and UBSan showed another issue with UB.

In v3:
- testing with UBSan didn't show issues at v2 but I was using gcc. clang exposes another UB bug, this one in decode_set_slot_number(). Added a patch "avoid negative slot shift" to fix that bug. Pointed out by Peter.

In v2:
- updated shift assertion to use shift >= 41 instead of 3.

v2: https://lore.kernel.org/qemu-devel/[email protected]/
v1: https://lore.kernel.org/qemu-devel/[email protected]/

Brian Cain (3):
target/hexagon: assert qfloat shift
target/hexagon: reset implicit USR write state
target/hexagon: avoid negative slot shift

 target/hexagon/decode.c           | 5 ++++-
 target/hexagon/mmvec/hvx_qfloat.c | 5 +++++
 target/hexagon/translate.c        | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1