Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1881375ybb; Sat, 11 Apr 2020 14:20:10 -0700 (PDT) X-Google-Smtp-Source: APiQypI5ui5Irl0uln4zDTzKwzyvWOcwLxWsWWisDybgKQbQtKNSiVZYNrlVltst//uphDHhY9Vp X-Received: by 2002:ac8:138c:: with SMTP id h12mr4892095qtj.210.1586640009984; Sat, 11 Apr 2020 14:20:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586640009; cv=pass; d=google.com; s=arc-20160816; b=i98Q7HGEHB1fSTn/Hc0kW99oczOwdIPjYhGmd7I4q66tWF/Ro92efUQLnUgWbNSm/4 /cLRNMabVUPGJ2rnf3EvOiz3jMU1dtyEvJ0anmkXqzs2fAYz7i4/Zcfq+XpV93rmfJcm v4IR9Cb8ZiDaan4g5L+4j+eNZtgJT+TsccLjFausmo1vR5Qy9Kz6s7KbiNXcaZr6HyHv jRZ83fffk7P0aoxgCBPbn6zbDDfItucEpCFKHRaVCWRTpDOhlPVKK2PiZaF5/WUCewvZ yOzITuOo4Aoy0gRLIgAV7ixfPDlyy4DzOL46JUqzF7ejuEL1gLzQ7B2UoxDZs72xVFb3 pavg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject; bh=p+526F/Mam6XrOHF+8r60r8/sMkvdjPjCGeICRbtLfY=; b=P/GSSHh54cD3GmG3GW4QC5OmZChsXMWHl4GHVLnS6ZgWdDOaTROR4Izj2UsjBCWPnB MMX2fBiq2paw0wCE9DvunTmOE5YjfLDcxWWIVZQP8Y0ONk916GBeLzx/AvugYq6Ydtt2 u54caAkTAOMOm+GvLjOmqFvo/vDqxg62a+AKNlo8+IvLqH+/y0d1EvFy6VcEsgDJoiBe SpwlhMZ6NIrUUmIKhr6+vOjma0h6W1l3VZ98MxzpX5TuPGrkjqDhlLCYjUJNoFxJo6JP 3xRzuxw/jRyrWZesQUvGKPS/32vSGSIsHlhwyu7+w0HZoqYVzVQx7J8EpQPRjdAt7Ln1 sFKw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hotmail.de dkim=pass dkdomain=hotmail.de dmarc=pass fromdomain=hotmail.de); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si3736262qkm.124.2020.04.11.14.19.51; Sat, 11 Apr 2020 14:20:09 -0700 (PDT) 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; arc=pass (i=1 spf=pass spfdomain=hotmail.de dkim=pass dkdomain=hotmail.de dmarc=pass fromdomain=hotmail.de); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbgDKVQU (ORCPT + 99 others); Sat, 11 Apr 2020 17:16:20 -0400 Received: from mail-am6eur05olkn2095.outbound.protection.outlook.com ([40.92.91.95]:17345 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726167AbgDKVQT (ORCPT ); Sat, 11 Apr 2020 17:16:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nv1PTjDMm9YR4qwbeCUgrIk/qiH5lFwseDxYRYc32qRhE/on3be25ONFENOGauOYVc6ybGpHCrZz6KAQasOALIJ7Z+bjtR2gWeqXfjeiUNd64pboNFzfKWWwo83gPkCTBAgAB7v8hYdmTPdiUJl+ApSt2dVtf2o6QR+qQb24SsQjKN0uHz1ooE6/I3XUo+tku8VEQoE+R10es5hqf9io7DUQjxUwUraGdhVnXW9xg+WITQ8PJnNA11/DZpueeImDt7xWLu7jqmxRnTSumBg0nigpSq7OCVsWpEFKOrI6FN8m0JYQmP1Sf4qZY1/6DkBW5OiIB1BttOFIAo9nzT7Ifg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p+526F/Mam6XrOHF+8r60r8/sMkvdjPjCGeICRbtLfY=; b=BSB6PlylQOxLinX0bEJVKfETYi8zXdA/GfsPhlj3bzJaILryyMsTEuukG4Vf6KT2TUupPwuPVV8eeJ9Z3O29kTarRs7giPP2NWiihcYz8+Fti+PwohOM9tNAXArDWME0r7ZlzdUysDq70XPB8Dh6XWYzfU3mLFiUDcoEh8cJ2DoJ4JEp2iRfE9IYZ8D8a72wd9Bj6UteO9L/DWyprULl5oIGVUzyMqwBlhmcTGubUQPrjC2dDEzTfFdSgtUvhoXCqDeYfbUfSTBUnmAdZ9ZLmrCMvmRh72HqwzPiF29fXU3GqDZKFY8TTcoqZFAMXetrkWd1f6VsewwCh9LT76bfrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hotmail.de; dmarc=pass action=none header.from=hotmail.de; dkim=pass header.d=hotmail.de; arc=none Received: from VI1EUR05FT057.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc12::4c) by VI1EUR05HT023.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc12::311) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.18; Sat, 11 Apr 2020 21:16:13 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (2a01:111:e400:fc12::4b) by VI1EUR05FT057.mail.protection.outlook.com (2a01:111:e400:fc12::213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Sat, 11 Apr 2020 21:16:13 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2EF9E1D8ED41CEA16694497FFDAA41182B72D2F6722073219D54A612C007258B;UpperCasedChecksum:2C52760A10AB5FDAC21863ED04DF63C2D1A1CF06646D1814F4834C8165EB0E45;SizeAsReceived:10005;Count:50 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::d57:5853:a396:969d]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::d57:5853:a396:969d%7]) with mapi id 15.20.2900.026; Sat, 11 Apr 2020 21:16:13 +0000 Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 To: Linus Torvalds Cc: Oleg Nesterov , "Eric W. Biederman" , Waiman Long , Ingo Molnar , Will Deacon , Linux Kernel Mailing List , Alexey Gladkov References: <87imi8nzlw.fsf@x220.int.ebiederm.org> <20200411182043.GA3136@redhat.com> From: Bernd Edlinger Message-ID: Date: Sat, 11 Apr 2020 23:16:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM0PR05CA0090.eurprd05.prod.outlook.com (2603:10a6:208:136::30) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) X-Microsoft-Original-Message-ID: <0c03f5a1-a552-26ba-8b62-27c26c51b88b@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (92.77.140.102) by AM0PR05CA0090.eurprd05.prod.outlook.com (2603:10a6:208:136::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Sat, 11 Apr 2020 21:16:12 +0000 X-Microsoft-Original-Message-ID: <0c03f5a1-a552-26ba-8b62-27c26c51b88b@hotmail.de> X-TMN: [FXjs14peoAjOBTAwmUpkVr/QFMzHnr2I] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 3a8cd20c-0347-4cde-5842-08d7de5d904e X-MS-TrafficTypeDiagnostic: VI1EUR05HT023: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wt5z7mwx516lCqMa5ZKiX6PcGua5absV/Ne+Nc5WNLuAZXj/mkc8YzS98WJfRyElgBtCBp9vJk34XGnl69wIcS4db7W5EPDRitAa1GqjVwxWsupy2uREt1rVK/2GgR06xOa8WgUJuKF140jegbm2s36Zc/khjxqDTVxuEBhV0H6DmMc29SPiPzZZJXkDwQeg X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR03MB5170.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: fTIbw18qb2HY8N/Noam7IDpjULd3Sv8T14XGSXTk8IfVBiDFzMiCEKGVM6rIH2336a1hzhYoyw8l9Xep7SR3uWs4v6gVfCDlBnbWAA+A1SqC212UfhQVDHkIMFS9NBeTsTl480nHIWzvPek5z830vw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a8cd20c-0347-4cde-5842-08d7de5d904e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2020 21:16:13.3751 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR05HT023 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/11/20 10:07 PM, Linus Torvalds wrote: > On Sat, Apr 11, 2020 at 12:15 PM Bernd Edlinger > wrote: >> >> But won't the dead thread's lifetime overlap the new thread's lifetime >> from the tracer's POV? > > What new thread? > > execve() doesn't create any new thread. > > But yes, an external tracer could see the (old) thread that did > execve() do new system calls before it sees the (other old) thread > that was a zombie. > That is an api change. Previously the strace could rely that there is a callback at the end of the execve and that all previous threads are de-zombiefied and waited for. Then there is a execve done event. And then the old thread continues to run but executing the new program. I'd bet the strace test suite has tests for that order of events, or at least it should. > But that is already somethign that can happen, simply because the > events aren't ordered. The whole issue is that the zombie thread > already died, but the tracer just didn't bother to read that state > change. What causes the deadlock is that de_thread waits for the tracer to wait on the threads. If that changes something will break in the user space. Of course you could say, I did not say "Simon says". Bernd. > > So it's not that the dead thread somehow _dies_ after the execve(). It > already died. > > It's just that whoever is to reap it (or traces it) just hasn't cared > to read the status of that thing yet. > > Linus >