[v3,0/4] linux-user: fix use of SIGRTMIN
mbox series

Message ID 20200212125658.644558-1-laurent@vivier.eu
Headers show
Series
  • linux-user: fix use of SIGRTMIN
Related show

Message

Laurent Vivier Feb. 12, 2020, 12:56 p.m. UTC
This series fixes the problem of the first real-time signals already
in use by the glibc that are not available for the target glibc.

Instead of reverting the first and last real-time signals we rely on
the value provided by the glibc (SIGRTMIN) to know the first available
signal and we map all the signals from this value to SIGRTMAX on top
of TARGET_SIGRTMIN. So the consequence is we have less available signals
in the target (generally 2) but all seems fine as at least 30 signals are
still available.

This has been tested with Go (golang 1.10.1 linux/arm64, bionic) on x86_64
fedora 31. We can avoid the failure in this case allowing the unsupported
signals when we don't provide the "act" parameters to sigaction, only the
"oldact" one. I have also run the LTP suite with several target and debian
based distros.

v3: use trace_event_get_state_backends()
    update comments
    Add R-b

v2: tested with golang 1.12.10 linux/arm64, eoan)
    Ignore unsupported signals rather than returning an error
    replace i, j by target_sig, host_sig

Laurent Vivier (4):
  linux-user: add missing TARGET_SIGRTMIN for hppa
  linux-user: cleanup signal.c
  linux-user: fix TARGET_NSIG and _NSIG uses
  linux-user: fix use of SIGRTMIN

 linux-user/hppa/target_signal.h |   1 +
 linux-user/signal.c             | 134 ++++++++++++++++++++++++--------
 linux-user/trace-events         |   3 +
 3 files changed, 106 insertions(+), 32 deletions(-)

Comments

Taylor Simpson Feb. 12, 2020, 4:42 p.m. UTC | #1
Tested-by: Taylor Simpson <tsimpson@quicinc.com>

> -----Original Message-----
> From: Laurent Vivier <laurent@vivier.eu>
> Sent: Wednesday, February 12, 2020 6:57 AM
> To: qemu-devel@nongnu.org
> Cc: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>; Laurent Vivier
> <laurent@vivier.eu>; Matus Kysel <mkysel@tachyum.com>;
> milos.stojanovic@rt-rk.com; Riku Voipio <riku.voipio@iki.fi>; Josh Kunz
> <jkz@google.com>; Taylor Simpson <tsimpson@quicinc.com>; Peter Maydell
> <peter.maydell@linaro.org>; Marlies Ruck <marlies.ruck@gmail.com>
> Subject: [PATCH v3 0/4] linux-user: fix use of SIGRTMIN
>
> This series fixes the problem of the first real-time signals already
> in use by the glibc that are not available for the target glibc.
>
> Instead of reverting the first and last real-time signals we rely on
> the value provided by the glibc (SIGRTMIN) to know the first available
> signal and we map all the signals from this value to SIGRTMAX on top
> of TARGET_SIGRTMIN. So the consequence is we have less available signals
> in the target (generally 2) but all seems fine as at least 30 signals are
> still available.
>
> This has been tested with Go (golang 1.10.1 linux/arm64, bionic) on x86_64
> fedora 31. We can avoid the failure in this case allowing the unsupported
> signals when we don't provide the "act" parameters to sigaction, only the
> "oldact" one. I have also run the LTP suite with several target and debian
> based distros.
>
> v3: use trace_event_get_state_backends()
>     update comments
>     Add R-b
>
> v2: tested with golang 1.12.10 linux/arm64, eoan)
>     Ignore unsupported signals rather than returning an error
>     replace i, j by target_sig, host_sig
>
> Laurent Vivier (4):
>   linux-user: add missing TARGET_SIGRTMIN for hppa
>   linux-user: cleanup signal.c
>   linux-user: fix TARGET_NSIG and _NSIG uses
>   linux-user: fix use of SIGRTMIN
>
>  linux-user/hppa/target_signal.h |   1 +
>  linux-user/signal.c             | 134 ++++++++++++++++++++++++--------
>  linux-user/trace-events         |   3 +
>  3 files changed, 106 insertions(+), 32 deletions(-)
>
> --
> 2.24.1