Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3689000imc; Sun, 24 Feb 2019 10:26:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ4xvB2mV6aiOJ3Uoc+bDZ89CwMEGKTHiVACyWWM5+DOFWd+aIse2ev3HzES9RtUT2ecyWy X-Received: by 2002:a17:902:2884:: with SMTP id f4mr3739299plb.203.1551032772288; Sun, 24 Feb 2019 10:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551032772; cv=none; d=google.com; s=arc-20160816; b=mJuOQGlZKQeN0HfYjtzZJ1mbslwLMbxWaT4CL7SHcXkOOT1u0LCpoGtL7uN/WWVIUu hWiYvG0mPqR+rdYnYk1mCSMiRlG19mJ5omxfuuDNE3+stqgJFMO53bfB88W+hVwoG7aA oeeqhiaVsueDmWHVQ6RF7ZB+lx2uNdJ0gNm4GDmNH2bK2kbcVh7SAlcjzxoQssaqVTzK jZAp5xWw5+0xeZY88YTK8EZZlrweLgOtmzth1Xop3oPCNWvrN7DaCEZBIjjKlDy3fD++ NpvkKGlke0GyGHouGMwbY/eJyiLEfqsdyt4oL69cm9hR8UlSW6EV2+GvLKDkM9+uY2Ze S/fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=Is74wfUBl6pn9ZZRn/dFpKrxijO+z7ftlavk0sonjIQ=; b=HzcRBUwdhhd6YdG+hPlxQizpvUMmYcbug91MNWvmPE41Er6JgiYs3bvmet7oV1WO+L 4X1sF/8QTBV1ggpCPaKEUpuSWN4FPxb9wi7+9XWgUsOCGDsMFklnDzaJQemn590qgHcs 4e/xrEu2TOvepR2QVLVaIjcX6md6ohwYDUgx7/qOFGT4+tyw0TOyX5px1ku+DCoCVUWc NW7+33YTyldMCWPUbHikkT3+G17piMMBvIsevElpWLeGy0Ijbp5upmCHGpqRxQ0ptHn4 hd5WyYSHHJsS7WhfY4ab2/VFVDP5m5E+28MLIwHqH5ksBwmxa8aGsn5qLslwjOZxPxzF 0p2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ES47LQyF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7si6949127plk.85.2019.02.24.10.25.54; Sun, 24 Feb 2019 10:26:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ES47LQyF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727909AbfBXSZf (ORCPT + 99 others); Sun, 24 Feb 2019 13:25:35 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36750 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbfBXSZf (ORCPT ); Sun, 24 Feb 2019 13:25:35 -0500 Received: by mail-wm1-f65.google.com with SMTP id j125so6068445wmj.1; Sun, 24 Feb 2019 10:25:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Is74wfUBl6pn9ZZRn/dFpKrxijO+z7ftlavk0sonjIQ=; b=ES47LQyF7Cdk7In15dXh8AWjTW1JVb2GNPknLfkCw9fZVxzJoWUHur+l1pan6hOQ7b PfdUGsLPB2s+VDvQQ285cxRphjOOLvIqK2ZCDSGW9LfZhXCH5yksi5sRvbdfPIhh4eGf g45LerNmjCTbA8L03+533itmFSM3of7VuoLtiEi1WJszpavJk/0FcKNzliML9TVYPTO+ xIbTYJSzDHBM4mVeu/udaz2F9UhEV7cJOnvogUrtERItrSb5nKb+1oyWPu9ftIAScoOW 7/uS1W8Jxf29RYtaXn1eqzZB7Ymt2PxytMf2/HWkFMZH0eP0GMgdllnLy5/yZXpM6YkR jSJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Is74wfUBl6pn9ZZRn/dFpKrxijO+z7ftlavk0sonjIQ=; b=PpCa0DE2IxGgDiAgOEGWHje/P6N5lUKObuZQbZzf3AcJU0shA7ltunzqXrdMRqYqAx fhp4ordi7rYTM/M+fx3IJHqiu6zApYSfGWpQ5c+BsGyu3R2BQO4ZP7vJf0+WSBdMjtad 4VoiqK0zhOp/p580tHGYUrQwgah58V3OO4W3pun1iNmgWr40+hv7kBKN4ciExl/YIr84 JhsJgZoT5nWUKRCdq7IW/EDMxSjCZv00Xl+m1rAiurqPn9JMg6CscTuH/TUXmMGb+y/m pr+2vT12a8OzoP2oQqodmROKZZ7Yb78I84HtN5vdVAcaEhjDT1v2Nhc7pGzUU6Mns6wv TULA== X-Gm-Message-State: AHQUAubdPnmmi49IxnUQWpvC+olWWpeziQ/VJC4CWTVk1NbDcKYRPXk+ O1RFBDmdbRp3qav+vrO7Fv0= X-Received: by 2002:a7b:c34c:: with SMTP id l12mr8096135wmj.147.1551032732546; Sun, 24 Feb 2019 10:25:32 -0800 (PST) Received: from ?IPv6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id p16sm17642556wro.25.2019.02.24.10.25.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Feb 2019 10:25:31 -0800 (PST) Subject: Re: [PATCH 4.20 11/50] signal: Always notice exiting tasks To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Dmitry Vyukov , "Eric W. Biederman" References: <20190213183655.747168774@linuxfoundation.org> <20190213183656.733725215@linuxfoundation.org> <95a41702-ac6a-cd58-2ca5-71d879ee923c@gmail.com> <20190219090714.GA27102@kroah.com> From: Jiri Slaby Openpgp: preference=signencrypt Autocrypt: addr=jirislaby@gmail.com; prefer-encrypt=mutual; keydata= mQINBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fjsualwb0Gwdx ReTZzMgheAyoy/umIOKrSEpWouVoBt5FFSZUyjuDdlPPYyPav+hpI6ggmCTld3u2hyiHji2H cDpcLM2LMhlHBipu80s9anNeZhCANDhbC5E+NZmuwgzHBcan8WC7xsPXPaiZSIm7TKaVoOcL 9tE5aN3jQmIlrT7ZUX52Ff/hSdx/JKDP3YMNtt4B0cH6ejIjtqTd+Ge8sSttsnNM0CQUkXps w98jwz+Lxw/bKMr3NSnnFpUZaxwji3BC9vYyxKMAwNelBCHEgS/OAa3EJoTf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hrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCu jlYQDFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmf faK/S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= Message-ID: <07f0b789-b88b-8afd-6a36-354b3c2fb0ba@gmail.com> Date: Sun, 24 Feb 2019 19:25:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190219090714.GA27102@kroah.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19. 02. 19, 10:07, Greg Kroah-Hartman wrote: > On Tue, Feb 19, 2019 at 07:23:41AM +0100, Jiri Slaby wrote: >> On 13. 02. 19, 19:38, Greg Kroah-Hartman wrote: >>> 4.20-stable review patch. If anyone has any objections, please let me know. >>> >>> ------------------ >>> >>> From: Eric W. Biederman >>> >>> commit 35634ffa1751b6efd8cf75010b509dcb0263e29b upstream. >>> >>> Recently syzkaller was able to create unkillablle processes by >>> creating a timer that is delivered as a thread local signal on SIGHUP, >>> and receiving SIGHUP SA_NODEFERER. Ultimately causing a loop >>> failing to deliver SIGHUP but always trying. >>> >>> Upon examination it turns out part of the problem is actually most of >>> the solution. Since 2.5 signal delivery has found all fatal signals, >>> marked the signal group for death, and queued SIGKILL in every threads >>> thread queue relying on signal->group_exit_code to preserve the >>> information of which was the actual fatal signal. >>> >>> The conversion of all fatal signals to SIGKILL results in the >>> synchronous signal heuristic in next_signal kicking in and preferring >>> SIGHUP to SIGKILL. Which is especially problematic as all >>> fatal signals have already been transformed into SIGKILL. >>> >>> Instead of dequeueing signals and depending upon SIGKILL to >>> be the first signal dequeued, first test if the signal group >>> has already been marked for death. This guarantees that >>> nothing in the signal queue can prevent a process that needs >>> to exit from exiting. >>> >>> Cc: stable@vger.kernel.org >>> Tested-by: Dmitry Vyukov >>> Reported-by: Dmitry Vyukov >>> Ref: ebf5ebe31d2c ("[PATCH] signal-fixes-2.5.59-A4") >>> History Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git >>> Signed-off-by: "Eric W. Biederman" >>> Signed-off-by: Greg Kroah-Hartman >> >> This patch breaks strace self-tests in 4.20.9. In particular, >> "threads-execve": >> https://github.com/strace/strace/blob/master/tests/threads-execve.c >> https://github.com/strace/strace/blob/master/tests/threads-execve.test >> >> The test received some fix a day ago, but it did not help in this case: >> https://github.com/strace/strace/commit/2a50278b9 >> >> Only a revert of the above patch helped. >> >> I don't know if the strace's test is broken (which is quite usual in >> cases like these) or the patch affects some user-visible behaviour -- >> e.g. could this be a reason for sh failures in the build farm? >> >> Any ideas? > > Does cf43a757fd49 ("signal: Restore the stop PTRACE_EVENT_EXIT") help > with this? It's queued up for the next round of stable releases and is > in Linus's tree. Yes, confirmed. thanks, -- js