All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/23] linux-user: Move signal trampolines to new page
@ 2021-06-18 19:29 Richard Henderson
  2021-06-18 19:29 ` [PATCH v2 01/23] linux-user: Add infrastructure for a signal trampoline page Richard Henderson
                   ` (22 more replies)
  0 siblings, 23 replies; 43+ messages in thread
From: Richard Henderson @ 2021-06-18 19:29 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.

Changes for v2:
  * Add r-b tags
  * Split arm v2_frame patch (phil)
  * Split mips install_sigtramp patch (phil)
  * Fix some arithmetic in a couple of setup_sigtramp (phil)


r~


Richard Henderson (23):
  linux-user: Add infrastructure for a signal trampoline page
  linux-user/aarch64: Implement setup_sigtramp
  linux-user/arm: Split out v2_frame
  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: Tidy install_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] 43+ messages in thread

end of thread, other threads:[~2021-07-02  9:07 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 19:29 [PATCH v2 00/23] linux-user: Move signal trampolines to new page Richard Henderson
2021-06-18 19:29 ` [PATCH v2 01/23] linux-user: Add infrastructure for a signal trampoline page Richard Henderson
2021-06-19  9:33   ` Philippe Mathieu-Daudé
2021-06-29 13:30   ` Peter Maydell
2021-06-18 19:29 ` [PATCH v2 02/23] linux-user/aarch64: Implement setup_sigtramp Richard Henderson
2021-06-29 13:36   ` Peter Maydell
2021-07-01 19:27     ` Richard Henderson
2021-06-18 19:29 ` [PATCH v2 03/23] linux-user/arm: Split out v2_frame Richard Henderson
2021-06-29 13:53   ` Peter Maydell
2021-06-29 14:30     ` Richard Henderson
2021-06-18 19:29 ` [PATCH v2 04/23] linux-user/arm: Force v2 frames for fdpic Richard Henderson
2021-06-29 13:54   ` Peter Maydell
2021-06-18 19:29 ` [PATCH v2 05/23] linux-user/arm: Implement setup_sigtramp Richard Henderson
2021-06-29 14:09   ` Peter Maydell
2021-06-29 18:32     ` Richard Henderson
2021-06-18 19:29 ` [PATCH v2 06/23] linux-user/alpha: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 07/23] linux-user/cris: " Richard Henderson
2021-06-19  9:33   ` Philippe Mathieu-Daudé
2021-06-19 12:55     ` Richard Henderson
2021-06-19 14:17       ` Philippe Mathieu-Daudé
2021-06-18 19:29 ` [PATCH v2 08/23] linux-user/hexagon: " Richard Henderson
2021-06-19  9:31   ` Philippe Mathieu-Daudé
2021-06-18 19:29 ` [PATCH v2 09/23] linux-user/hppa: Document non-use of setup_sigtramp Richard Henderson
2021-06-18 19:29 ` [PATCH v2 10/23] linux-user/i386: Implement setup_sigtramp Richard Henderson
2021-06-29 14:40   ` Peter Maydell
2021-06-29 18:30     ` Richard Henderson
2021-06-18 19:29 ` [PATCH v2 11/23] linux-user/m68k: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 12/23] linux-user/microblaze: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 13/23] linux-user/mips: Tidy install_sigtramp Richard Henderson
2021-06-19  9:29   ` Philippe Mathieu-Daudé
2021-06-18 19:29 ` [PATCH v2 14/23] linux-user/mips: Implement setup_sigtramp Richard Henderson
2021-06-18 19:29 ` [PATCH v2 15/23] linux-user/nios2: Document non-use of setup_sigtramp Richard Henderson
2021-06-19  9:35   ` Philippe Mathieu-Daudé
2021-06-18 19:29 ` [PATCH v2 16/23] linux-user/openrisc: Implement setup_sigtramp Richard Henderson
2021-06-18 19:29 ` [PATCH v2 17/23] linux-user/ppc: " Richard Henderson
2021-06-29 14:52   ` Peter Maydell
2021-06-18 19:29 ` [PATCH v2 18/23] linux-user/riscv: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 19/23] linux-user/s390x: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 20/23] linux-user/sh4: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 21/23] linux-user/sparc: " Richard Henderson
2021-07-02  9:05   ` Philippe Mathieu-Daudé
2021-06-18 19:29 ` [PATCH v2 22/23] linux-user/xtensa: " Richard Henderson
2021-06-18 19:29 ` [PATCH v2 23/23] linux-user: Remove default for TARGET_ARCH_HAS_SIGTRAMP_PAGE 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.