All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/21] linux-user: Move signal trampolines to new page
@ 2021-06-16  1:11 Richard Henderson
  2021-06-16  1:11 ` [PATCH 01/21] linux-user: Add infrastructure for a signal trampoline page Richard Henderson
                   ` (21 more replies)
  0 siblings, 22 replies; 53+ messages in thread
From: Richard Henderson @ 2021-06-16  1:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee, laurent

It is my guess that the majority of the flakiness with the
linux-user signals.c test is due to a race condition between
translation and page writes.  I vaguely recall a bug report
about this, but I cannot find it now.

Since the vast majority of "self-modifying code" is due to
signal delivery, work around this by allocating a new page,
into which we write the signal handlers.

A better workaround would be to implement the vdso that is
required by many guests.  However, that is a much larger
problem, and some guests do not define a vdso in upstream
linux.  This serves as a decent fallback.

Neither bit of work, I will note, solves the posited race
condition described above.


r~


Richard Henderson (21):
  linux-user: Add infrastructure for a signal trampoline page
  linux-user/aarch64: Implement setup_sigtramp
  linux-user/arm: Force v2 frames for fdpic
  linux-user/arm: Implement setup_sigtramp
  linux-user/alpha: Implement setup_sigtramp
  linux-user/cris: Implement setup_sigtramp
  linux-user/hexagon: Implement setup_sigtramp
  linux-user/hppa: Document non-use of setup_sigtramp
  linux-user/i386: Implement setup_sigtramp
  linux-user/m68k: Implement setup_sigtramp
  linux-user/microblaze: Implement setup_sigtramp
  linux-user/mips: Implement setup_sigtramp
  linux-user/nios2: Document non-use of setup_sigtramp
  linux-user/openrisc: Implement setup_sigtramp
  linux-user/ppc: Implement setup_sigtramp
  linux-user/riscv: Implement setup_sigtramp
  linux-user/s390x: Implement setup_sigtramp
  linux-user/sh4: Implement setup_sigtramp
  linux-user/sparc: Implement setup_sigtramp
  linux-user/xtensa: Implement setup_sigtramp
  linux-user: Remove default for TARGET_ARCH_HAS_SIGTRAMP_PAGE

 linux-user/aarch64/target_signal.h    |   2 +
 linux-user/alpha/target_signal.h      |   1 +
 linux-user/arm/target_signal.h        |   2 +
 linux-user/cris/target_signal.h       |   2 +
 linux-user/hexagon/target_signal.h    |   2 +
 linux-user/hppa/target_signal.h       |  14 ++
 linux-user/i386/target_signal.h       |   2 +
 linux-user/m68k/target_signal.h       |   2 +
 linux-user/microblaze/target_signal.h |   2 +
 linux-user/mips/target_signal.h       |   1 +
 linux-user/mips64/target_signal.h     |   2 +
 linux-user/nios2/target_signal.h      |   3 +
 linux-user/openrisc/target_signal.h   |   2 +
 linux-user/ppc/target_signal.h        |   2 +
 linux-user/qemu.h                     |   7 +
 linux-user/riscv/target_signal.h      |   2 +
 linux-user/s390x/target_signal.h      |   2 +
 linux-user/sh4/target_signal.h        |   2 +
 linux-user/sparc/target_signal.h      |   4 +
 linux-user/x86_64/target_signal.h     |   3 +
 linux-user/xtensa/target_signal.h     |   2 +
 linux-user/aarch64/signal.c           |  28 ++--
 linux-user/alpha/signal.c             |  34 +++--
 linux-user/arm/signal.c               | 190 +++++++++++++++-----------
 linux-user/cris/signal.c              |  29 ++--
 linux-user/elfload.c                  |  13 ++
 linux-user/hexagon/signal.c           |  19 ++-
 linux-user/i386/signal.c              |  42 +++---
 linux-user/m68k/signal.c              |  47 +++----
 linux-user/microblaze/signal.c        |  24 +++-
 linux-user/mips/signal.c              |  39 ++++--
 linux-user/openrisc/signal.c          |  24 ++--
 linux-user/ppc/signal.c               |  34 ++---
 linux-user/riscv/signal.c             |  22 +--
 linux-user/s390x/signal.c             |  24 ++--
 linux-user/sh4/signal.c               |  40 +++---
 linux-user/signal.c                   |   3 +
 linux-user/sparc/signal.c             |  32 +++--
 linux-user/xtensa/signal.c            |  50 ++++---
 39 files changed, 488 insertions(+), 267 deletions(-)

-- 
2.25.1



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

end of thread, other threads:[~2021-06-18  1:32 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  1:11 [PATCH 00/21] linux-user: Move signal trampolines to new page Richard Henderson
2021-06-16  1:11 ` [PATCH 01/21] linux-user: Add infrastructure for a signal trampoline page Richard Henderson
2021-06-16 13:36   ` Max Filippov
2021-06-16  1:11 ` [PATCH 02/21] linux-user/aarch64: Implement setup_sigtramp Richard Henderson
2021-06-16 17:00   ` Philippe Mathieu-Daudé
2021-06-16  1:11 ` [PATCH 03/21] linux-user/arm: Force v2 frames for fdpic Richard Henderson
2021-06-16 17:01   ` Philippe Mathieu-Daudé
2021-06-16  1:11 ` [PATCH 04/21] linux-user/arm: Implement setup_sigtramp Richard Henderson
2021-06-16 13:46   ` Alex Bennée
2021-06-16 13:49     ` Alex Bennée
2021-06-16 17:40       ` Richard Henderson
2021-06-16  1:11 ` [PATCH 05/21] linux-user/alpha: " Richard Henderson
2021-06-16 16:56   ` Philippe Mathieu-Daudé
2021-06-16  1:11 ` [PATCH 06/21] linux-user/cris: " Richard Henderson
2021-06-16 16:37   ` Philippe Mathieu-Daudé
2021-06-16  1:11 ` [PATCH 07/21] linux-user/hexagon: " Richard Henderson
2021-06-16  8:07   ` Taylor Simpson
2021-06-16 15:05     ` Richard Henderson
2021-06-16 15:50       ` Richard Henderson
2021-06-16 21:37         ` Taylor Simpson
2021-06-16 23:15           ` Richard Henderson
2021-06-16  1:11 ` [PATCH 08/21] linux-user/hppa: Document non-use of setup_sigtramp Richard Henderson
2021-06-16 10:46   ` Philippe Mathieu-Daudé
2021-06-16 21:16   ` Alex Bennée
2021-06-16  1:11 ` [PATCH 09/21] linux-user/i386: Implement setup_sigtramp Richard Henderson
2021-06-16  1:11 ` [PATCH 10/21] linux-user/m68k: " Richard Henderson
2021-06-16 16:42   ` Philippe Mathieu-Daudé
2021-06-16  1:11 ` [PATCH 11/21] linux-user/microblaze: " Richard Henderson
2021-06-16 16:43   ` Philippe Mathieu-Daudé
2021-06-16  1:12 ` [PATCH 12/21] linux-user/mips: " Richard Henderson
2021-06-16 16:48   ` Philippe Mathieu-Daudé
2021-06-16  1:12 ` [PATCH 13/21] linux-user/nios2: Document non-use of setup_sigtramp Richard Henderson
2021-06-16  1:12 ` [PATCH 14/21] linux-user/openrisc: Implement setup_sigtramp Richard Henderson
2021-06-16 16:49   ` Philippe Mathieu-Daudé
2021-06-17  0:24   ` Stafford Horne
2021-06-16  1:12 ` [PATCH 15/21] linux-user/ppc: " Richard Henderson
2021-06-16  1:12 ` [PATCH 16/21] linux-user/riscv: " Richard Henderson
2021-06-16  1:12   ` Richard Henderson
2021-06-16 16:50   ` Philippe Mathieu-Daudé
2021-06-16 16:50     ` Philippe Mathieu-Daudé
2021-06-18  1:29   ` Alistair Francis
2021-06-18  1:29     ` Alistair Francis
2021-06-16  1:12 ` [PATCH 17/21] linux-user/s390x: " Richard Henderson
2021-06-16 16:52   ` Philippe Mathieu-Daudé
2021-06-16  1:12 ` [PATCH 18/21] linux-user/sh4: " Richard Henderson
2021-06-16 16:53   ` Philippe Mathieu-Daudé
2021-06-16  1:12 ` [PATCH 19/21] linux-user/sparc: " Richard Henderson
2021-06-16  1:12 ` [PATCH 20/21] linux-user/xtensa: " Richard Henderson
2021-06-16 13:35   ` Max Filippov
2021-06-16  1:12 ` [PATCH 21/21] linux-user: Remove default for TARGET_ARCH_HAS_SIGTRAMP_PAGE Richard Henderson
2021-06-16 16:54   ` Philippe Mathieu-Daudé
2021-06-16 15:05 ` [PATCH 00/21] linux-user: Move signal trampolines to new page Alex Bennée
2021-06-16 15:09   ` Richard Henderson

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.