From patchwork Wed Feb 12 12:56:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1236824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Hfpf3hdcz9sRJ for ; Wed, 12 Feb 2020 23:58:50 +1100 (AEDT) Received: from localhost ([::1]:36972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1rbM-0007lR-Co for incoming@patchwork.ozlabs.org; Wed, 12 Feb 2020 07:58:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60897) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1rag-0007Zo-6X for qemu-devel@nongnu.org; Wed, 12 Feb 2020 07:58:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1raL-0003oA-UU for qemu-devel@nongnu.org; Wed, 12 Feb 2020 07:58:06 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:46713) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1raL-0003mn-LD for qemu-devel@nongnu.org; Wed, 12 Feb 2020 07:57:45 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MTRIi-1iwGUU1kVw-00TjHm; Wed, 12 Feb 2020 13:57:02 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 0/4] linux-user: fix use of SIGRTMIN Date: Wed, 12 Feb 2020 13:56:54 +0100 Message-Id: <20200212125658.644558-1-laurent@vivier.eu> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:0rjlJ0YODUADJOsQsOeGHZYbE0MCKl2dpUA47BFIpUlRvAgS/CR HmNLwW+Zj9ASFAvEQLo33ag6gQa0lLEnFp/+cH6gWOXVEWJvhsMKOO2/YV6r4ZppSmF7AMI c0xY1jbauthMkjBuTdiZXg8ZMSPWJMOzfxAe7Quz8vspH2MqMEB6GvhxQO6kc4y7KdKmQvd 2IEQbrw2mC0t/73PId8yQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:Sw1yLnDobr4=:JInrVZT1YDc4LOpPnRBNEG FoT03JE3dzKcZetdgBX170qsxj68OKdnF+TTMb/NazOG4d6WjdjfdSU4XC8IEHU55rkqQ/i48 eNEH0L8NbLOTNN8aVs4Xnw68tgMnJ/5lAv/Mlo1hE8cRVqMQElwgyrs9opaBPODf6UQYBTSki Qe0WngvoQIz/MFShzG3NPEZytFCXYHFPk0ZJdsmJzVrUjbgSJ1L403Q3qZ7mGkdCn0yjybjpr KM0NQnU4LlShAd1wuibLqBFUOZUxsNR+Mxab2AjHn2VfecjKXPN8o2RVLoVhcY1/8uTUh2X1m 42Zkg0hL5ArUQsyqPlqAdvtrlXf66jX6cWEDfNB1z0IFCxdA1Oa7VayXoHP0MgpEA/kuKXWoW heJARtrXBlNYofRd9DTF2yFFUaOCHMAdVOznSFXp/0NfflOCzqt6ELwN+/ZKFh3CN3j9Oo0hi 8A+rB5vW3vsO/jwYGk2Co46mY7FJOHLOOOiEL+VLQg+SAaFQyNJLB6QsLzMqzBcgZNzSlMLqv 4M3CGagsmSfgA2pkUiYEehCJTShNfty//iQBCIJfn++Xqz6vafsOqrEDCNhUNTBQ3k37PvKwh JwAw0hk2zJPRtM/cw51h9C08hYN44wLWLnQ5i9GF+rYmIHb4LMNB54rltDYdSBp7FQQC/ovNp 47qkGOgB4LcdPRDiXHUKAb5ybBlh52R8DEAq9V8RmhR3f6b05oLCD5iC2PBfti5W2fpOo+r89 XWieEafmrshYPHw+fNJ5Sy0oKdtEF6ZPJsMBb5TL4bQm6XqAMZE0r7oEhhDdu61bifbq5eDsY TnhRVRVUbbBpII7NGDDZyx3YqXADudgd3/z7HSaH5HJlwEDZc+Ov7GWqx4ffHH7jxST3M4S X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Marlies Ruck , Riku Voipio , Laurent Vivier , Aleksandar Markovic , Josh Kunz , Taylor Simpson , Matus Kysel , milos.stojanovic@rt-rk.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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(-) Tested-by: Taylor Simpson