From patchwork Fri May 10 10:45:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 163852 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp2193160ilr; Fri, 10 May 2019 03:49:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFLlN0ExYBRqJ+LIGZnnKyR/Jm11vmK5vcFP9LPfvIdiwRo89jt81/RYMLxPAkjCZjhzve X-Received: by 2002:a5d:4cd0:: with SMTP id c16mr873845wrt.20.1557485375860; Fri, 10 May 2019 03:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557485375; cv=none; d=google.com; s=arc-20160816; b=XWbsJLXBvi17GhUy4dnJorVLhaQ4sV+FAepJzOQrKClz+1cf17AZidfpe5Csix412N NHs20Htnzfc9MFEVcJBknpvA5zpPTZGsT/vjCV4Zp00D8XSyTViA12T0tG4Hrkm1UvpP CIb5zPtffElrceh+tNk2AP+UDKi7eKhMU/+F7zab41JukqNosUwhpyE0+JJY2w+yyUjN J1Tjriagb0XGdGlz89daXkjUMIg7j/OI4Zp66kJM6VLOuMVdmRmvWLeowGxUVH+EXTrc I1CdnYa3EemGl1dc8pVUkBbuBJQuhKy63pEIgd+RNeoUXMAlUfduAhnHgvLJ0Pgbd8y6 7Kgg== 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=BZDLXBL9sHBf9pBNZVQSV55ybRgr1+haj/aLEN9nX6cSgktMz6V9EyrbagLw81+R5A OwIQR6QjY1ITeYMDd87p5oqcTqWiJWW3LOeZMVtK+54gFUvE8+YUZfNDLpUTDkR4EZCj 2qAzWMGCH2fkdWYiEzy3IBbQI71TLdducS9xU9ivw2jtrJnRtWfa8FLJYrkNneoIjm1m ejDHgYpGkEjh1H+3bRNZ1V9QLHVnqkxXiqOJwK8+5GKRByzZRdXjhailMKOjd8yt+XBh RmzhEt6exXcK0kjGQXUDgllCaajodyl9FTcJ8ZGZ4fQ/U8N5K/PBddHujM5iDYCob8/3 1hdA== 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 u10si2923920wmm.84.2019.05.10.03.49.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 May 2019 03:49:35 -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]:40964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP35q-0001au-P2 for patch@linaro.org; Fri, 10 May 2019 06:49:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP32C-00077u-OH for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP32B-0003V7-Ql for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:48 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:49353) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP32B-0003Uc-IK for qemu-devel@nongnu.org; Fri, 10 May 2019 06:45:47 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4bd0-1hOUXP06vW-001fG9; Fri, 10 May 2019 12:45:45 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 12:45:35 +0200 Message-Id: <20190510104536.17483-7-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190510104536.17483-1-laurent@vivier.eu> References: <20190510104536.17483-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:P0YC4i9p+55HDi78kXQ9LCtYjqHPaDZL+otsOi5KUhIp/yCpDfV N5J4vho4xHSiC6F2uik5CberFNieN+pXALZGX0PUkU2DFTXjGSrolBZR5rUHWP+L/fk+nMK uumd0klNDxn1XY8PreUx0j8spLasGp5UKc+5VmcpQqz/acamB2HIYz63ZIYexpCLir7wzwM k9uH16rrxHHCKM4VnYDJw== X-UI-Out-Filterresults: notjunk:1; V03:K0:iGIZFBUxNC4=:fgaoKx6VuBrOfekjOxLDDN dZUoBRFVXmZ+TB08ahXSWHou/R2izKTaGn02ybd02WTVbIZ9NkDu+NRcGmeO0NdAEpl5PHjl1 V1C+1MXO+jnbEsxx1OWSePQ8ZIkjY2F0f6/909SMwBPCGqmRsdjY6HxH5GPdLKWzVU9scq4gG e4WvqderD5cq61KVAnsgdRd557evj7kMif+Egddz4pecCoYaeQpGQRYHbNI2nLBHEvfhhYU8+ O8cafQctmGyzxWWpCyZQrNkZaiGyrn7bwaTs1vM0smxN7rc9BVcujKfyiS0aoDDCc3Uk7YbTo ccLdeNODm9VRwYirFZQZtn/+rHj1iQltH102s32wxrjI65S3WPWgurTDzm51ShJIawxu9wXuG GvOCnNHW9coMqxMVpTYWIluHcRyfqmR9x8cFlrBffWKIKpv926xE4dqnHePJLkYHcII/Pg2EN rloguQAd66S8pBDuvR54f/4XEUTXtoDD95/zHAirMbhkALn6fAFxpEjNjDcXqxFAbqOrvGyGU vOLUMnY5vmWKOIAqnmxXRaa5MgC/pfPFancQPuapjuhgVeq2VLQWerfD35wZnBSnbEU/8PVEc yMUgyFZsgkFWFHGMhfrGNV+8g85lPpY99N/wB2PeVgcRY+03LvJAh9aFcFqS9HNumKarEEDZL gBSMvZD4qnnopUXTZYRH+5YkRDqOxoZqCHJlvEPhQuC95W96uv4WEuM00W4qcGaN0iEGra11H cQhhAdwRiyzoA0Wbri42JTeZSV8qFK0qBYQL9Yci084ZHkX6MOtVNfizg6A= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PULL v2 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) {