Skip to content

Handle some invalid encodings

Brian Cain qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyIn review
  2. v34 patches 1 replySuperseded
  3. v24 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches5 repliesSuperseded

Changes in v4 from the cover letter

Reg write conflict moved into decode.c, S-b Taylor.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4target/hexagon: Fix invalid duplex decodinglinux-user/hexagon/cpu_loop.c target/hexagon/decode.c target/hexagon/translate.c +2 more+113 -40 replies
2/4target/hexagon: Return decode failure for invalid non-duplex encodingstarget/hexagon/decode.c tests/tcg/hexagon/invalid-encoding.c+27 -10 replies
3/4tests/tcg/hexagon: Handle SIGILL internally in invalid-slots testtests/tcg/hexagon/Makefile.target tests/tcg/hexagon/invalid-slots.c+59 -230 replies
4/4target/hexagon: Detect register write conflictslinux-user/hexagon/cpu_loop.c target/hexagon/cpu_bits.h target/hexagon/decode.c +5 more+248 -21 reply

Reviews trailers per patch

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

PatchTaylor SimpsonPierrick Bouvier
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b

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

Read the v4 thread

Cover letter [PATCH v4 0/4] Handle some invalid encodings

Fix the issues reported by Alex Rønne Petersen causing zig test suite failures. The 0x0 case is a conflicting "multiple register write" - the handler here will cover duplexes but not the more general case of multiple register writes. I'll include that in a subsequent patchset.

v2: use a signal handler for SIGILL, combine the tests. S-b Pierrick.

v3:
Dropped "Reject duplex encodings" and added "Detect register write conflicts..." -> more general algo S-b Taylor. This patch moved over the test_zero() case covering the same 0x00000000 inst encoding R-b Alex.

v4:
Reg write conflict moved into decode.c, S-b Taylor.

Brian Cain (4):
target/hexagon: Fix invalid duplex decoding target/hexagon: Return decode failure for invalid non-duplex encodings tests/tcg/hexagon: Handle SIGILL internally in invalid-slots test target/hexagon: Detect register write conflicts

 linux-user/hexagon/cpu_loop.c        |   5 +
 target/hexagon/cpu_bits.h            |   1 +
 target/hexagon/decode.c              |  70 ++++++++++-
 target/hexagon/gen_trans_funcs.py    |  10 ++
 target/hexagon/insn.h                |   4 +
 target/hexagon/translate.c           |  28 ++++-
 tests/tcg/hexagon/Makefile.target    |   8 +-
 tests/tcg/hexagon/invalid-encoding.c | 106 +++++++++++++++++
 tests/tcg/hexagon/invalid-slots.c    |  76 +++++++++---
 tests/tcg/hexagon/multiple-writes.c  | 169 +++++++++++++++++++++++++++
 10 files changed, 447 insertions(+), 30 deletions(-)
 create mode 100644 tests/tcg/hexagon/invalid-encoding.c
 create mode 100644 tests/tcg/hexagon/multiple-writes.c
Signature · 1 line
2.34.1