Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2456682ybf; Mon, 2 Mar 2020 09:01:56 -0800 (PST) X-Google-Smtp-Source: ADFU+vtDhE9ZAWhorFTwFVDqA5U9tumTWI3bp5zhjxuIpZbsSpVUYze5LmMXp5MlUitLxTpZOMdi X-Received: by 2002:a9d:480c:: with SMTP id c12mr113290otf.336.1583168516723; Mon, 02 Mar 2020 09:01:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1583168516; cv=pass; d=google.com; s=arc-20160816; b=bLoM/PSDk5IoipmZ2ycPCDUhudWrJ/U3XA1tRGteKwSvG7Qgt9U4X7i+7EIn85D/ho BjutPJ+M/nK4tiZ+E65R77SAsnrwOerYn5Ga29PEmWpKdArh7HVTauVpuqUKJIGB9R3x q7AbBBAe+Mz5RFbMmak5+Uqf6j6vsRkWBG8It7HVW4L7GN71ngvTS3WOMP5gc8PZBKRN 6qWJbiAYY5e46gL5n8Rfv6XYL9Gk2TvclMuNjmYjR4Kt4tVyeqwiQwwS2GT79n1+Sb0j SUzxC0OV4B3vIUiiQKboxSGaFl5EdmBxzl8B7SsV47hxQ289O7XBnli4tr7AdpV7/hO/ s6oQ== 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-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=WA21ewjcrpsXWZt9Fw4ry56JMT73bI/ugt3nQCmPsDE=; b=TAlMsX2U1KMkFlXRXJ4AHgR8JrTgVG52AFDhM8yzLDwg7QbA28Q8x6jm0cn9I6u16O 0lPm8a947cS0TuhWa0nUPbYDXDmRw2gLz9oLBJ/PvYiyxQ+NxFl3Att+jdesshMmXMc4 ybVCqwBETnMjai6N5wmuiK6DcWPML1vi2ZxX0apln3C86yRvxsZjoUdZXnr+hkqPD2Rs L1E15Cs4e7JdIXcSTA39Yft+j1LXUG6VNFDnRw7XM+ZjOh8XWJXQrRj8s3+0hxSu1OsB U8FeXM8BvYwmDN6JfYAT1Pf7ft4gAID5ulaQWPxrHTnVYBfcpP9gziIxV1rcToWtcmOR dGSA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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 a59si316105otb.8.2020.03.02.09.01.42; Mon, 02 Mar 2020 09:01:56 -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; arc=pass (i=1); 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 S1727291AbgCBRBX (ORCPT + 99 others); Mon, 2 Mar 2020 12:01:23 -0500 Received: from mail-oln040092075038.outbound.protection.outlook.com ([40.92.75.38]:45446 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726775AbgCBRBX (ORCPT ); Mon, 2 Mar 2020 12:01:23 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QnOyX0eu+4/+2rCYB7jCginOyHp/D8av1fxRoTjngq2YbDJ6wQU+a/6Q7B5VVn4XdLCiuxn0t8HI6vz3N4IW1a1W46xlW4P6YbNf72wyZ//7QDVYbYgZbfK8bkhMMfFEMt0GKJpbzwE3lu1wEqAHd/RNVeg9t3sQhD/j0ij5203BOLsh+TLKYwOqHdFasLlJHwJ+fSqUB6KrY86QrYz2vxNAwllM23ucJUheDMem4y/P/nCc+1WPc/0L7n8CalD/Df1+SGUTthvnuMc3Aq/WN4JxMxAM+aly22G3afdGUNkHny8pRy8deku+x7CkxqDlpISSvTrSwxmrK/9o4HRsrQ== 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=WA21ewjcrpsXWZt9Fw4ry56JMT73bI/ugt3nQCmPsDE=; b=EAbH/NKCNun1++YIdZLiDggfcyeCba8nEY7/a90a7bc+G/UnlfZnkA79t1+TFlw+PBeDrcPm/iqkd9Ui1j0cpOwfjA8+4xAZHyBNMbkKFpjElpT4jzPMrg1UWhFt4qMfpqnkWj2ePdvqP5LFhf7LZ6fCAhKIRs3/pXhHc5OWh97aSAQCOY+s7bF157NqVgb9/9Re/mNrQt8pfcteB+HCGYPZxdT3Va8etWrHb04wWF4gt+lPKlmpzRC6qMJkUTCpelq9PI+RYigGKbrdB9uGaNj3yd+oQmUjtUS2AwnIsDxfrP6XRKoSuUsdE3T5coN6Bbn+7vjafJWcMOb78LOszg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from HE1EUR04FT039.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::37) by HE1EUR04HT087.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::341) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Mon, 2 Mar 2020 17:01:16 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (10.152.26.57) by HE1EUR04FT039.mail.protection.outlook.com (10.152.26.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15 via Frontend Transport; Mon, 2 Mar 2020 17:01:16 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::1956:d274:cab3:b4dd]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::1956:d274:cab3:b4dd%6]) with mapi id 15.20.2772.019; Mon, 2 Mar 2020 17:01:16 +0000 Received: from [192.168.1.101] (92.77.140.102) by AM0PR02CA0050.eurprd02.prod.outlook.com (2603:10a6:208:d2::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.19 via Frontend Transport; Mon, 2 Mar 2020 17:01:14 +0000 From: Bernd Edlinger To: Jann Horn , "Eric W. Biederman" , James Morris CC: Christian Brauner , Jonathan Corbet , Alexander Viro , Andrew Morton , Alexey Dobriyan , Thomas Gleixner , Oleg Nesterov , Frederic Weisbecker , Andrei Vagin , Ingo Molnar , "Peter Zijlstra (Intel)" , Yuyang Du , David Hildenbrand , Sebastian Andrzej Siewior , Anshuman Khandual , David Howells , Kees Cook , Greg Kroah-Hartman , Shakeel Butt , Jason Gunthorpe , Christian Kellner , Andrea Arcangeli , Aleksa Sarai , "Dmitry V. Levin" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "stable@vger.kernel.org" , linux-security-module Subject: Re: [PATCHv2] exec: Fix a deadlock in ptrace Thread-Topic: [PATCHv2] exec: Fix a deadlock in ptrace Thread-Index: AQHV8AjGwZG4WijWc0+aQpdADP+q6qg02ufjgACXoYCAAASqH4AAAMAAgAAEyVeAAAZ9gIAABRGA Date: Mon, 2 Mar 2020 17:01:15 +0000 Message-ID: References: <20200301185244.zkofjus6xtgkx4s3@wittgenstein> <87a74zmfc9.fsf@x220.int.ebiederm.org> <87k142lpfz.fsf@x220.int.ebiederm.org> <875zfmloir.fsf@x220.int.ebiederm.org> In-Reply-To: Accept-Language: en-US, en-GB, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR02CA0050.eurprd02.prod.outlook.com (2603:10a6:208:d2::27) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) x-incomingtopheadermarker: OriginalChecksum:B9900F4872545ACD7B4AC262212F03A1E8A251A8262895C2309629EF04574F00;UpperCasedChecksum:A2F46114EB3F5EECD1B1F9451433BDD545E1FC5BEE559AB4C61F4CEBEEAFC406;SizeAsReceived:9664;Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [+bQ+L/1tslDbS4A/h6efaDr1Ao78Wc6h] x-microsoft-original-message-id: <4984a737-4348-acf5-d7da-1b13c229779b@hotmail.de> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: b99cce61-de58-4120-ce85-08d7becb517f x-ms-traffictypediagnostic: HE1EUR04HT087: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PHAVQw6ieVLi+gUQJKsbLwvSjFUl+cGfz74jHKbNgNkRKsHzj7VqNaX3wyzCipwj9oFJROIHK4xYzpbjtSwJ86vrfEae2DQk6nqoQYQ/5u6GtRt/F7gj3JiAf3GTiKREjWJOWY14z6E+z/gCKKoj5CKWRpQ8rpKUFKmjn1puUOZba7R3acI3ESdVfKphjjgl x-ms-exchange-antispam-messagedata: ZrML1GdK2182QozWaahfNS/ivDwgl/bYgAZ2XDFrUwjoGt3seGI0pibT9eExt4Ayvne3N3S64NncWC7BiBzEvdSvX4MtKqaikQLSYPH818Q1HdfPmlROATh4xMRMQQ+BiSKFvDMHbPSMELNBthEJpw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: <12A9E26DF39C81429C8540E7796CCA8E@eurprd03.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b99cce61-de58-4120-ce85-08d7becb517f X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2020 17:01:15.7559 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT087 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMy8yLzIwIDU6NDMgUE0sIEphbm4gSG9ybiB3cm90ZToNCj4gT24gTW9uLCBNYXIgMiwgMjAy MCBhdCA1OjE5IFBNIEVyaWMgVy4gQmllZGVybWFuIDxlYmllZGVybUB4bWlzc2lvbi5jb20+IHdy b3RlOg0KPj4NCj4+IEJlcm5kIEVkbGluZ2VyIDxiZXJuZC5lZGxpbmdlckBob3RtYWlsLmRlPiB3 cml0ZXM6DQo+Pg0KPj4+IE9uIDMvMi8yMCA0OjU3IFBNLCBFcmljIFcuIEJpZWRlcm1hbiB3cm90 ZToNCj4+Pj4gQmVybmQgRWRsaW5nZXIgPGJlcm5kLmVkbGluZ2VyQGhvdG1haWwuZGU+IHdyaXRl czoNCj4+Pj4NCj4+Pj4+DQo+Pj4+PiBJIHRyaWVkIHRoaXMgd2l0aCBzL0VBQ0NFU1MvRUFDQ0VT Ly4NCj4+Pj4+DQo+Pj4+PiBUaGUgdGVzdCBjYXNlIGluIHRoaXMgcGF0Y2ggaXMgbm90IGZpeGVk LCBidXQgc3RyYWNlIGRvZXMgbm90IGZyZWV6ZSwNCj4+Pj4+IGF0IGxlYXN0IHdpdGggbXkgc2V0 dXAgd2hlcmUgaXQgZGlkIGZyZWV6ZSByZXBlYXRhYmxlLg0KPj4+Pg0KPj4+PiBUaGFua3MsIFRo YXQgaXMgd2hhdCBJIHdhcyBhaW1pbmcgYXQuDQo+Pj4+DQo+Pj4+IFNvIHdlIGhhdmUgb25lIG1l dGhvZCB3ZSBjYW4gcHVyc3VlIHRvIGZp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