From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>,
Laurent Vivier <laurent@vivier.eu>,
Cornelia Huck <cohuck@redhat.com>
Cc: "jonathan . albrecht" <jonathan.albrecht@linux.vnet.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
Ulrich Weigand <ulrich.weigand@de.ibm.com>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org, Andreas Krebbel <krebbel@linux.ibm.com>
Subject: [PATCH v6 0/2] target/s390x: Fix SIGILL and SIGFPE psw.addr reporting
Date: Mon, 5 Jul 2021 23:04:32 +0200 [thread overview]
Message-ID: <20210705210434.45824-1-iii@linux.ibm.com> (raw)
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.
A similar problem exists for SIGFPE.
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).
v3: https://lists.nongnu.org/archive/html/qemu-devel/2021-06/msg00299.html
v3 -> v4: Fix compiling the test on Ubuntu 20.04 (Jonathan).
v4: https://lists.nongnu.org/archive/html/qemu-devel/2021-06/msg05848.html
v4 -> v5: Greatly simplify the fix (Ulrich).
v5: https://lists.nongnu.org/archive/html/qemu-devel/2021-06/msg06244.html
v5 -> v6: Fix breakpoints (David). Add gdbstub test.
Note: the compare-and-trap SIGFPE issue is being fixed separately.
https://lists.nongnu.org/archive/html/qemu-devel/2021-06/msg05690.html
Ilya Leoshkevich (2):
target/s390x: Fix SIGILL and SIGFPE psw.addr reporting
tests/tcg/s390x: Test SIGILL and SIGSEGV handling
linux-user/s390x/cpu_loop.c | 12 +-
tests/tcg/s390x/Makefile.target | 18 +-
tests/tcg/s390x/gdbstub/test-signals-s390x.py | 76 ++++++++
tests/tcg/s390x/signals-s390x.c | 165 ++++++++++++++++++
4 files changed, 269 insertions(+), 2 deletions(-)
create mode 100644 tests/tcg/s390x/gdbstub/test-signals-s390x.py
create mode 100644 tests/tcg/s390x/signals-s390x.c
--
2.31.1
next reply other threads:[~2021-07-05 21:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 21:04 Ilya Leoshkevich [this message]
2021-07-05 21:04 ` [PATCH v6 1/2] target/s390x: Fix SIGILL and SIGFPE psw.addr reporting Ilya Leoshkevich
2021-07-06 9:30 ` David Hildenbrand
2021-07-05 21:04 ` [PATCH v6 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling Ilya Leoshkevich
2021-07-20 13:30 ` jonathan.albrecht
2021-07-26 16:23 ` Ilya Leoshkevich
2021-08-03 14:33 ` Thomas Huth
2021-08-03 8:13 ` [PATCH v6 0/2] target/s390x: Fix SIGILL and SIGFPE psw.addr reporting Cornelia Huck
2021-08-03 10:16 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210705210434.45824-1-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=jonathan.albrecht@linux.vnet.ibm.com \
--cc=krebbel@linux.ibm.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=ulrich.weigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.