All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting
@ 2021-06-23  2:32 Ilya Leoshkevich
  2021-06-23  2:32 ` [PATCH v5 1/2] " Ilya Leoshkevich
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Ilya Leoshkevich @ 2021-06-23  2:32 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand, Laurent Vivier, Cornelia Huck
  Cc: jonathan . albrecht, Ilya Leoshkevich, Ulrich Weigand,
	qemu-devel, Christian Borntraeger, qemu-s390x, 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.
A similar problem exists for SIGFPE and SIGTRAP.

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).

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/SIGFPE/SIGTRAP psw.addr reporting
  tests/tcg/s390x: Test SIGILL and SIGSEGV handling

 linux-user/s390x/cpu_loop.c     |   5 +
 tests/tcg/s390x/Makefile.target |   1 +
 tests/tcg/s390x/signal.c        | 165 ++++++++++++++++++++++++++++++++
 3 files changed, 171 insertions(+)
 create mode 100644 tests/tcg/s390x/signal.c

-- 
2.31.1



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

end of thread, other threads:[~2021-07-12 21:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  2:32 [PATCH v5 0/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting Ilya Leoshkevich
2021-06-23  2:32 ` [PATCH v5 1/2] " Ilya Leoshkevich
2021-07-05  9:36   ` David Hildenbrand
2021-07-05 17:24     ` Ilya Leoshkevich
2021-07-05 19:18       ` David Hildenbrand
2021-07-05 20:19         ` Ilya Leoshkevich
2021-07-06  9:15           ` Ulrich Weigand
2021-06-23  2:32 ` [PATCH v5 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling Ilya Leoshkevich
2021-06-23  2:42 ` [PATCH v5 0/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting no-reply
2021-07-02 10:34 ` Cornelia Huck
2021-07-02 12:01   ` Laurent Vivier
2021-07-02 21:00     ` Ulrich Weigand
2021-07-05  9:27     ` Cornelia Huck
2021-07-12 14:59     ` jonathan.albrecht
2021-07-12 21:22       ` Ilya Leoshkevich

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.