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: 163842 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp2007072ilr; Fri, 10 May 2019 00:19:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWX6PVzaPCsIN8g7Q4Pcu5yQvQJkdq+z5IcdIqCcNQKbajWb/UcdZrghTQZ7h++vHA4yY8 X-Received: by 2002:adf:dbc1:: with SMTP id e1mr6751871wrj.203.1557472780067; Fri, 10 May 2019 00:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557472780; cv=none; d=google.com; s=arc-20160816; b=UrCgTCInWUKLPDifSM7WAof0BbtsCeiCMr7OYk8X8igAJlwy9wd73LCJndeYapJ+5v sK+A1EimTjtaJhGROGzDLOWq7DF7SEQbJk4BwMmqAxc484wTLMn158hFYpHcoJYVZkVg X10ChKPN3hUrf185733GSJlP+d2ma2ka8WMu9liNFAP8y8PuUuZqcQ13wnXXw2wNUg8Y 3hTd92mSzsfW/gmmwuMzYEOyx3HgdR4B/73LayipFH0cGqocDsFvr9Ko4OSO7TkrEKsx gUhrYeQ5hQJgXEl3YEfLJnboLMEcO1dJHFYf1qc2tHI9ezT1yJA36le/YRzUxiJbJ4bu V1TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=BiWS2A+43k0kPne60VuhGRCku7PP2UduexnDqb8ezhc=; b=WG5hNokO0ugKIzvqha/zscvf74z27S9/2ZCwr3mScNQ8HC/gMqSfY+vBcQgHdHFHYx 1VP97eezkSwromuOZhHcyg5sgixiEbfweE99yQOa1qECQMDZyJylariOZmQ3I36Ulqed 7dHwsW6cJbksi7VEuKalMVjeevvSNynl1VH1r0C3XF4d8AjkZ7n2yVSN2YCIpDnIXomi fl55FJ5eN+mo8+1VKWYFjoZt1xoDhXOMcPWVpTk4scd5Czqe6Ye7Pz3nF5VpVBC1t73k 5ITDR2TfGiS+ZExUGcio8ATDcsgchkiYrnUsL1tZ5mUnpCshx1ciB5HXg172EzcJf014 CnZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h14si4008491wrx.1.2019.05.10.00.19.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 May 2019 00:19:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([127.0.0.1]:38190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzoh-0008An-1k for patch@linaro.org; Fri, 10 May 2019 03:19:39 -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+patch=linaro.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(+) -- 2.20.1 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) {