qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] target/s390x: Fix SIGILL psw.addr reporting
@ 2021-06-02  0:22 Ilya Leoshkevich
  2021-06-02  0:22 ` [PATCH v3 1/2] " Ilya Leoshkevich
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Ilya Leoshkevich @ 2021-06-02  0:22 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand, Laurent Vivier,
	Cornelia Huck
  Cc: Christian Borntraeger, qemu-s390x, qemu-devel, Ilya Leoshkevich,
	Andreas Krebbel

qemu-s390x puts a wrong value into SIGILL's siginfo_t's psw.addr: it
should be a pointer to the instruction following the illegal
instruction, but at the moment it is a pointer to the illegal
instruction itself. This breaks OpenJDK, which relies on this value.

Patch 1 fixes the issue, patch 2 adds a test.

v1: https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06592.html
v1 -> v2: Use a better buglink (Cornelia), simplify the inline asm
          magic in the test and add an explanation (David).

v2: https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06649.html
v2 -> v3: Fix SIGSEGV handling (found when trying to run valgrind under
          qemu-user).

Ilya Leoshkevich (2):
  target/s390x: Fix SIGILL psw.addr reporting
  tests/tcg/s390x: Test SIGILL and SIGSEGV handling

 linux-user/s390x/cpu_loop.c     |  23 ++++-
 target/s390x/excp_helper.c      |  71 +++++++-------
 target/s390x/internal.h         |   1 +
 target/s390x/mem_helper.c       |   2 +-
 tests/tcg/s390x/Makefile.target |   1 +
 tests/tcg/s390x/signal.c        | 163 ++++++++++++++++++++++++++++++++
 6 files changed, 224 insertions(+), 37 deletions(-)
 create mode 100644 tests/tcg/s390x/signal.c

-- 
2.31.1



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-06-21 14:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-02  0:22 [PATCH v3 0/2] target/s390x: Fix SIGILL psw.addr reporting Ilya Leoshkevich
2021-06-02  0:22 ` [PATCH v3 1/2] " Ilya Leoshkevich
2021-06-02  0:22 ` [PATCH v3 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling Ilya Leoshkevich
2021-06-18 13:47   ` jonathan.albrecht
2021-06-21 11:58     ` Ilya Leoshkevich
2021-06-02  0:27 ` [PATCH v3 0/2] target/s390x: Fix SIGILL psw.addr reporting no-reply
2021-06-10  9:49 ` David Hildenbrand
2021-06-10  9:53   ` Christian Borntraeger
2021-06-21 12:00   ` Ilya Leoshkevich
2021-06-21 13:12     ` jonathan.albrecht
2021-06-21 13:44       ` Ilya Leoshkevich
2021-06-21 14:46         ` jonathan.albrecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).