[{"id":1768322,"web_url":"http://patchwork.ozlabs.org/comment/1768322/","msgid":"<CAECwjAiqNL5DzjK8qfQugb_G3Ed42LRzVOyC36gUBtuVeU0uPA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-14T03:38:40","subject":"Re: [LEDE-DEV] [PATCH libubox 2/2] uloop: Enable utracing of\n\tmulti-threaded programs","submitter":{"id":65295,"url":"http://patchwork.ozlabs.org/api/people/65295/","name":"Yousong Zhou","email":"yszhou4tech@gmail.com"},"content":"On 12 September 2017 at 19:12, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\n> This is needed for Linux < 4.7 or < 4.4.13 to report ptrace events in\n> threads.\n>\n> Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>\n> ---\n>  uloop.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/uloop.c b/uloop.c\n> index 3813e18..e6d77df 100644\n> --- a/uloop.c\n> +++ b/uloop.c\n> @@ -369,7 +369,7 @@ static void uloop_handle_processes(void)\n>         do_sigchld = false;\n>\n>         while (1) {\n> -               pid = waitpid(-1, &ret, WNOHANG);\n> +               pid = waitpid(-1, &ret, WNOHANG|__WALL);\n>                 if (pid < 0 && errno == EINTR)\n>                         continue;\n>\n\nNACK because this changes the current behaviour of only handling\ntermination of child processes notified via SIGCHLD signal.  It may\nbreak existing users of the library.\n\n                yousong","headers":{"Return-Path":"<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"cxn3Q07V\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"nGegtIVt\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xt4694bTVz9t3H\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 13:39:45 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dsKzw-0002rW-Ek; Thu, 14 Sep 2017 03:39:28 +0000","from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dsKzs-0002m2-2j\n\tfor lede-dev@lists.infradead.org; Thu, 14 Sep 2017 03:39:26 +0000","by mail-yw0-x243.google.com with SMTP id r85so1116441ywg.3\n\tfor <lede-dev@lists.infradead.org>;\n\tWed, 13 Sep 2017 20:39:01 -0700 (PDT)","by 10.37.183.76 with HTTP; Wed, 13 Sep 2017 20:38:40 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:Subject:To:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=+dEk4VfUXLmay/syQWWbAkxYVZKK4QUNKIW6aoIxnNU=;\n\tb=cxn3Q07V7V/nKH\n\tUoXs4d7U7QAny9lALfkW9rq6iaYYnb9f9okEPKPZXkaOXzXRcZNQtNuQxW1Iacqi2XIuOI9MxliBe\n\t99X3smEjTp1AFs9nAZqc7GsjMGXrKmy25HOoOHpRJugur0cYTwZjpUCTulJ69UsAjY1Hr+rsAZ++u\n\tP4K+HslAsrwHXKEDHGs65Mo0w+TEKJ+4K8LrZKicUbd4nx+82DHCRRGqrGEUxptHTsYnGYSfmqEld\n\trkMSDPR3lqpdqQ7PS1kG1lCLvTAWJ5zbqZMK2Qt8CVPYhGkGxwIABb5xH+5PeljwYz6pUrUcJ5/8k\n\tEJ3DHc+QAlmQNCKVsJXw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=j3anWDo75kh51BFuoqvQ85y2F6VPnBzNHw6vH3qOq+Y=;\n\tb=nGegtIVtNt/wNSxrrVGJkOlu1oZGJ+RYsWT62XEGW0+z4e4wa00+2HhYEubOmPPmLD\n\trlY4dIfj+WF4K1uhGTfR3FdR/rO/NU2DZFcjojJmssboHTXu9HTvvQw6XSBfq34eB5/k\n\tGqzaTAq1rmfYaR/10+Fp2bI0p8uuvCov67hPH37ul/N+WkmnJK0qjq8o3f3qe4UE9zSQ\n\tIUPhc2ihqAhyHLBZ4ZuHHxI/oXFGLwpVd7bwzo1aPWecnNTAh65k+2D5GMUBefypQoy0\n\t2nc2nx59yEa16w1kWX0WsutL86OWm2coAEkF5YPXKEMmvEFR8Dy2/eqGWH3mCoqrtlCx\n\twieA=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=j3anWDo75kh51BFuoqvQ85y2F6VPnBzNHw6vH3qOq+Y=;\n\tb=OB3v7aQv+qz90r2X+RKA7SNj09tNIO5g3zposESjJVKU4jkeUczBQI5bdOvHCCFurc\n\tadjkkXasB2kkIQht/ePTAzWfZklpXDVNCK4GtKE3fFtzRWO9mtWLc4/r/3FMq4rc11wp\n\turNGkSiqGqHRErcC0bwFTXfvo1CzIbZZiR5yNSfS2P0/qkRkNEmoG06zdyAe/wS0YtYo\n\tDF59bTl4E3Y1PkkBHAspQB3C9uC/phH9re/tHIu2S8l5dPIASBifACpxiupjMZjBXeeP\n\tXtHMyZTMlmt0itZahROPER4Sv+mA6lNNaNag3XQ7IUyOyeEQhKclPzGj09ILfLo0abFD\n\tNIww==","X-Gm-Message-State":"AHPjjUiBvmZ52pd6VYy2yb/q0jcrWWE62d7R+lP3wKQiEpdRl1lD6+p8\n\tBrr6WblEEtrhXhEU4xhLSmlBkQwW/xy0+zrm/WyU7A==","X-Google-Smtp-Source":"AOwi7QDt2lPYWyr9Nqx3y+wLR8rcgwlCyfRejxWv2sjV35AvqflAuh9PWO8INtkTw2crDp4X/i0JRm/VbknLE5dIO9w=","X-Received":"by 10.129.135.2 with SMTP id x2mr4749120ywf.381.1505360341144;\n\tWed, 13 Sep 2017 20:39:01 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170912111250.31576-3-sojkam1@fel.cvut.cz>","References":"<20170912111250.31576-1-sojkam1@fel.cvut.cz>\n\t<20170912111250.31576-3-sojkam1@fel.cvut.cz>","From":"Yousong Zhou <yszhou4tech@gmail.com>","Date":"Thu, 14 Sep 2017 11:38:40 +0800","Message-ID":"<CAECwjAiqNL5DzjK8qfQugb_G3Ed42LRzVOyC36gUBtuVeU0uPA@mail.gmail.com>","To":"Michal Sojka <sojkam1@fel.cvut.cz>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170913_203924_231784_D28C2BA4 ","X-CRM114-Status":"UNSURE (   9.70  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4002:c05:0:0:0:243 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (yszhou4tech[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","Subject":"Re: [LEDE-DEV] [PATCH libubox 2/2] uloop: Enable utracing of\n\tmulti-threaded programs","X-BeenThere":"lede-dev@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<lede-dev.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/lede-dev/>","List-Post":"<mailto:lede-dev@lists.infradead.org>","List-Help":"<mailto:lede-dev-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>","Cc":"LEDE Development List <lede-dev@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>","Errors-To":"lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1768605,"web_url":"http://patchwork.ozlabs.org/comment/1768605/","msgid":"<87d16tzkgi.fsf@steelpick.2x.cz>","list_archive_url":null,"date":"2017-09-14T09:41:01","subject":"Re: [LEDE-DEV] [PATCH libubox 2/2] uloop: Enable utracing of\n\tmulti-threaded programs","submitter":{"id":14651,"url":"http://patchwork.ozlabs.org/api/people/14651/","name":"Michal Sojka","email":"sojkam1@fel.cvut.cz"},"content":"On Thu, Sep 14 2017, Yousong Zhou wrote:\n> On 12 September 2017 at 19:12, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\n>> This is needed for Linux < 4.7 or < 4.4.13 to report ptrace events in\n>> threads.\n>>\n>> Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>\n>> ---\n>>  uloop.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/uloop.c b/uloop.c\n>> index 3813e18..e6d77df 100644\n>> --- a/uloop.c\n>> +++ b/uloop.c\n>> @@ -369,7 +369,7 @@ static void uloop_handle_processes(void)\n>>         do_sigchld = false;\n>>\n>>         while (1) {\n>> -               pid = waitpid(-1, &ret, WNOHANG);\n>> +               pid = waitpid(-1, &ret, WNOHANG|__WALL);\n>>                 if (pid < 0 && errno == EINTR)\n>>                         continue;\n>>\n>\n> NACK because this changes the current behaviour of only handling\n> termination of child processes notified via SIGCHLD signal.  It may\n> break existing users of the library.\n\nOK. It should not influence the rest of the patch series, because LEDE\nseems to ship newer kernel versions than those needing this patch.\n\n-Michal","headers":{"Return-Path":"<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"UYS+yuqY\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"pWOqiwfB\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtKRK71xWz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 23:40:29 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dsUNF-0002q4-2p; Thu, 14 Sep 2017 13:40:09 +0000","from casper.infradead.org ([2001:8b0:10b:1236::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dsUNC-0002d7-0d\n\tfor lede-dev@bombadil.infradead.org; Thu, 14 Sep 2017 13:40:06 +0000","from relay.felk.cvut.cz ([2001:718:2:1611:0:1:0:70])\n\tby casper.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dsUN8-0005tb-Ry\n\tfor lede-dev@lists.infradead.org; Thu, 14 Sep 2017 13:40:04 +0000","from rtime.felk.cvut.cz (rtime.felk.cvut.cz\n\t[IPv6:2001:718:2:1655::9f])\n\tby relay.felk.cvut.cz (8.15.2/8.14.9) with ESMTP id v8EDd4bG015795;\n\tThu, 14 Sep 2017 15:39:04 +0200 (CEST)\n\t(envelope-from sojkam1@fel.cvut.cz)","from localhost ([127.0.0.1] helo=steelpick.2x.cz)\n\tby rtime.felk.cvut.cz with esmtp (Exim 4.84_2)\n\t(envelope-from <sojkam1@fel.cvut.cz>)\n\tid 1dsUMC-0007LO-0m; Thu, 14 Sep 2017 15:39:04 +0200","from wsh by steelpick.2x.cz with local (Exim 4.89)\n\t(envelope-from <sojkam1@fel.cvut.cz>)\n\tid 1dsQdp-0001Ex-Q3; Thu, 14 Sep 2017 11:41:01 +0200"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-ID:Date:\n\tReferences:In-Reply-To:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=haYgLM7UfuS5zdm71SQ6TBBP321iexQhUGsAPVWqhu8=;\n\tb=UYS+yuqYEPa9iV\n\t17Es2sZ2M7acTp4KEmYlQuuSWrermn7gfnQEi4GYY6WxikIOQMrsVQQrJKRKl56SaWwfmEKdvlDrM\n\t6fIK8C88FPAtDeeCx8r4sejtDrp6o4N7aKNcH8pW/TlSO8NJfr9PnhUzm0M4qjOAJAX6hEjLEMeOH\n\tSCEd43tAWXmp/Yr6GZ2vIIy5WiTbfYerSDaMvIezzOvJ+iYQfZwkrZ0henFb+dqVCnvMxSrrSqE4n\n\t7QyQfDD8CF/Gw/XLAlrkazmB1McDV6SOhnJ1jeoVQPT82N479B3XtOox5MtSfAc8E4sPV7aO7kg96\n\tt6+HIfmExB4Zbiphy23w==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=casper.20170209;\n\th=Content-Type:MIME-Version:Message-ID:\n\tDate:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=yG8YXCzkzxQPsJkjm13LJv+euIx6d95QS7+OLmKd7U4=;\n\tb=pWOqiwfBW/OL1T0knMFNJAWt8\n\tQqyPIffHoNEEKt3k0adH07l0lSQEgz3tAp1sMggImLQtVhN1jMgLqfhGNL6DpSyAZ/v0lMLXCEwAk\n\trBfYVCUdZEJ778vcYQyjOXJHisEFiNQH01ZLKPsxvcYP+CUx/jLwijqfozLrEzpMK5cW78kJxAdZZ\n\ts6uMCAzBt4c5f86y9Fnbx74zdqa6M15lKcWsjYNpnR+4b6HKxEjB0NyRTnWV20Nt+KclJt+KE/Aax\n\tTQHGWlUhqHzobtxZMoPWwk+EaJPra6FJ827m55buNUgHhK3LQ4d6gYpHhe/v/3iPxlrhB87vmJvIS\n\tiZESVf7/A==;"],"From":"Michal Sojka <sojkam1@fel.cvut.cz>","To":"Yousong Zhou <yszhou4tech@gmail.com>","In-Reply-To":"<CAECwjAiqNL5DzjK8qfQugb_G3Ed42LRzVOyC36gUBtuVeU0uPA@mail.gmail.com>","References":"<20170912111250.31576-1-sojkam1@fel.cvut.cz>\n\t<20170912111250.31576-3-sojkam1@fel.cvut.cz>\n\t<CAECwjAiqNL5DzjK8qfQugb_G3Ed42LRzVOyC36gUBtuVeU0uPA@mail.gmail.com>","Date":"Thu, 14 Sep 2017 11:41:01 +0200","Message-ID":"<87d16tzkgi.fsf@steelpick.2x.cz>","MIME-Version":"1.0","X-FELK-MailScanner-Information":"","X-MailScanner-ID":"v8EDd4bG015795","X-FELK-MailScanner":"Found to be clean","X-FELK-MailScanner-SpamCheck":"not spam, SpamAssassin (not cached,\n\tscore=1.091, required 6, BAYES_00 -0.50, DATE_IN_PAST_03_06 1.59,\n\tRP_MATCHES_RCVD -0.00)","X-FELK-MailScanner-SpamScore":"s","X-FELK-MailScanner-From":"sojkam1@fel.cvut.cz","X-FELK-MailScanner-Watermark":"1506001149.62283@7aNB3Kicl08giOK7cy1cUg","X-Spam-Status":"No","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170914_144003_007944_F6BB305D ","X-CRM114-Status":"GOOD (  12.69  )","X-Spam-Score":"-2.6 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on casper.infradead.org summary:\n\tContent analysis details:   (-2.6 points, 5.0 required)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium\n\ttrust [2001:718:2:1611:0:1:0:70 listed in] [list.dnswl.org]\n\t1.6 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","Subject":"Re: [LEDE-DEV] [PATCH libubox 2/2] uloop: Enable utracing of\n\tmulti-threaded programs","X-BeenThere":"lede-dev@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<lede-dev.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/lede-dev/>","List-Post":"<mailto:lede-dev@lists.infradead.org>","List-Help":"<mailto:lede-dev-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>","Cc":"LEDE Development List <lede-dev@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>","Errors-To":"lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]