Skip to content

Fix BRASL and BRCL with large negative offsets

Ilya Leoshkevich 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 1 replyIn review
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- Use MAP_NORESERVE (Christian / David).
- Unhardcode 0x100000006 (Richard).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3s390x/tcg: Fix BRASL with a large negative offsettarget/s390x/tcg/translate.c+1 -10 replies
2/3s390x/tcg: Fix BRCL with a large negative offsettarget/s390x/tcg/translate.c+1 -10 replies
3/3tests/tcg/s390x: Test BRASL and BRCL with large negative offsetstests/tcg/s390x/Makefile.target tests/tcg/s390x/branch-relative-long.c+69 -00 replies

Reviews trailers per patch

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

PatchDavid HildenbrandRichard Henderson
1/3R-b R-b
2/3R-b R-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] Fix BRASL and BRCL with large negative offsets

Hi,

I noticed that sometimes jumping backwards leads to crashes or hangs. The problem is a missing cast.
Patches 1 and 2 fix the problem, patch 3 adds a test.

v1: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03356.html
v1 -> v2:
- Skip the test if mmap() fails (Richard).
- Replace test opcodes with inline asm (David). Since we now want to skip the test if the code cannot be mapped (e.g. on a 31-bit host), we shouldn't be asking the loader to map the code right away. So the mmap() approach stays.

v2: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03387.html
v2 -> v3:
- Use MAP_NORESERVE (Christian / David).
- Unhardcode 0x100000006 (Richard).

Best regards,
Ilya

Ilya Leoshkevich (3):
s390x/tcg: Fix BRASL with a large negative offset s390x/tcg: Fix BRCL with a large negative offset tests/tcg/s390x: Test BRASL and BRCL with large negative offsets

 target/s390x/tcg/translate.c           |  4 +-
 tests/tcg/s390x/Makefile.target        |  1 +
 tests/tcg/s390x/branch-relative-long.c | 68 ++++++++++++++++++++++++++
 3 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 tests/tcg/s390x/branch-relative-long.c
Signature · 1 line
2.35.1