From patchwork Fri May 10 07:15:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1097857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 450hS56QQzz9s9y for ; Fri, 10 May 2019 17:20:05 +1000 (AEST) Received: from localhost ([127.0.0.1]:38190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzp5-0008An-OM for incoming@patchwork.ozlabs.org; Fri, 10 May 2019 03:20:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzlR-0005lm-FJ for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOzlQ-0001j1-Fc for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:17 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:36127) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOzlQ-0001iM-73 for qemu-devel@nongnu.org; Fri, 10 May 2019 03:16:16 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MNKuK-1h5qLV3Xj8-00Opf7; Fri, 10 May 2019 09:16:08 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 09:15:56 +0200 Message-Id: <20190510071557.30126-7-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510071557.30126-1-laurent@vivier.eu> References: <20190510071557.30126-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:hpNSk8jCFA1gGs/HUMOgsJ+gKep+ZKMO7Go9f1u9v+bd64gSuHe Fhn4mtwWDfPfWJcxVMpwuoYm+RC2x2HQ963dagxHtlgrSHDZrXnNXp34cUo1HD4sqOtzCyg jlLxfd3yCYix9zzdkUkKsmxdGh5xcVDNUrv8yIQBpbSg5wC5H092uDcbDyn7sts22W6FE5F q+zrduuayQxqbp9ii1nww== X-UI-Out-Filterresults: notjunk:1; V03:K0:+LoJWPF+eIs=:W9XGFgsfveehGrK7iGXTE4 xxAHNVumVxtkTyt04QT+1o3JWnRxhu+c2l9eRtluyseIunuP52ZdA/PlHUsk6eOeSxGZg1swF c+1AiLTAgIjWTpQMn9ss/rAJtfOAHDAVPi40v7egnW8lQRoqE+G2I9IgBCZCDrRnyOCgrndrx ioUDuwk9Xz3w5fKVZRLE/NrDUm3M5LVscIMqqXMYtg2G5l5fcTFXg8yDJmHRR4aV7nZC/ISvs aJjIdFrQkUT26IYAv6MgwKYG8BX3cYc0Q/gb71juagTng9lswdXVtNRYBZTXfiAlbtQSo83vB RNKihDzN8BOJotnKMXWUyVRhKYr5C4vv/2YqLwLU2muBLLyWO5qcWiYSV/N24mm7lR4B7xD4i Jrxj4VRVL97YkYrVaPB4zhu5c5uUX4bkdI/KMekKE0I4AsgGNhEPFIAGaf0cHBtYTFo6HbKEY q+fYx6arJN16A+r/x8LA9wEmIqx5Xi+WxzyDilaSAd9geIAFj5Wo7PWCosK+Ik7j7vqDR3Q9E YqG6aF04CiRhQ+Vxy6GenbPFP86I4M+/itD57E/NJvaVu9qSIlhsbbinRI++DiNkOfEO7jL8u AmO+cvbfj9+i+gGoPEvG+tKR+lDy5y79H//eDSQe/iZinWl86OHf2wRfVXDgwuRZcERvBZhAO t4OMSFZdRe95IktdY4uCraMyVl3f2F6v5OT0JarBn/uyPSFl60xDLV63fQrM2mTWTw4px22qN nqc4IFFw73Mrep4dKf3kKziSbT50+pHKq1gTmkgEDg0xx/XoxRLqypf6j/g= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL 6/7] linux-user: avoid treading on gprof's SIGPROF signals X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée The guest tends to get confused when it receives signals it doesn't know about. Given the gprof magic has also set up it's own handler we would do well to avoid stomping on it as well. Signed-off-by: Alex Bennée Message-Id: <20190502145846.26226-1-alex.bennee@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/signal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c index e2c0b3717357..44b2d3b35a0d 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -508,6 +508,11 @@ void signal_init(void) act.sa_flags = SA_SIGINFO; act.sa_sigaction = host_signal_handler; for(i = 1; i <= TARGET_NSIG; i++) { +#ifdef TARGET_GPROF + if (i == SIGPROF) { + continue; + } +#endif host_sig = target_to_host_signal(i); sigaction(host_sig, NULL, &oact); if (oact.sa_sigaction == (void *)SIG_IGN) {