Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1442207ybf; Sun, 1 Mar 2020 09:29:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwZgX92oRtiHGxcdNmJJY7AK78rnjzgVk6M4RLzSoL+MK/9vX2j4AhTRdBe9BsOC7u7uQoa X-Received: by 2002:aca:b1d5:: with SMTP id a204mr9021808oif.82.1583083769350; Sun, 01 Mar 2020 09:29:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1583083769; cv=pass; d=google.com; s=arc-20160816; b=sVeWNEbDeyLp04DD3p41+gPzhDiXdRBGjrdSSZHIjNn5+nJxPqPQ0OYeGKmXJ+9iRM bJNZ/tNSkj8rczKmkBTda5LmS+sm3TkLAYefXyRVcQnl0TTgI0QvYdN1wXsHg22769bK S9aGPMcrN9eZb9vPSu0IpznfuCD0HxV+Fh4e1o+zxonToTWK+GArmsJnk3SufXXFVawl q70P8EP1gF4RE+o/lbEqvJ3exUyJyWeHhKYTIP5D9ftnz6A0N0DkV6o9XPUCkFq03Crh SDP9m8vVUo1wimOnvVRNwZ6cODgJHQ1sy3Q0a9MzdHkwTHtiPP+YRQSzLANZToAfeQPl nzPA== 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-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=q0GTyf1bu2gumQ4QsQdGqeGEA0011tKa138LsNyag4g=; b=AOXuRuO7kRuP+uF2+CwUS18cTyv9xkbpi8DxxRbYphddo8GYC4mCpyPKSWuZImAac0 5r7Pf5NHFDUPigj7599bAaFgmS4JLh+B91Ch/asYfaMRu2Dta57unLyPR52wfXRDFzxA 9ED++1XeI7K9msNBJPOMyc7Yid9SnhG42EDuhqIj4mqMbQoG0xqbmQtXgpWStZ33YpUH opokMTIrsLnqsLfk4RGbUELrc6107JdMMcAycIlEKPb4PS5ycX9uzIxSDQ9x3Zv113+a VlJFcUr96jngUC6VEK0uvALCiPdj3+1ZPanjnPtfnFzY9B99lB6rBgdtR1N3osh74qSo Sg1w== 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 r11si4766810oti.178.2020.03.01.09.29.04; Sun, 01 Mar 2020 09:29:29 -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 S1726536AbgCAR2d (ORCPT + 99 others); Sun, 1 Mar 2020 12:28:33 -0500 Received: from mail-oln040092064052.outbound.protection.outlook.com ([40.92.64.52]:7462 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726146AbgCAR2c (ORCPT ); Sun, 1 Mar 2020 12:28:32 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBIPB9QoQEP8/iVFFlYAl/tLC/ajaGFOU+pwf5SGcMogpSIgxbnpgr1OtL54HbFwSHMftXfJrp8S1sdy22Xp90ZDRSj/2BXxyXT7buswlDTczwUF0Ocnm2e3qdPqUdKVzYMgY/kJ022P2GpW5tdFLquuWEW+7X1AMFM10ittZHx6tHEiFIXPEVozoevgDULRjjZwLEGKUxu8rq68sLOP0ViFT34w8GvE+BpJC2j29b5Lgsw5aYCwLI5M63u0AB5643iKA5+hXH9Ll4JxM/obKkRQwh5cCIuqIXCj/lnqcsgDm/F/cQeGElSzaU5/3+U0eeiXGWuPWoH9fsEhUe7n1g== 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=q0GTyf1bu2gumQ4QsQdGqeGEA0011tKa138LsNyag4g=; b=GpVkMqM+kF00MT+qAxm3/pilMTU78WuNIdyCt9SHJ0N7TbS+txUpAoelIKCNFS6TP6uuy1yI9NAI0Ak7OWvlAudwuJqdnz3SGLb0Z4TEbzh1xtgaeTWt/DGuoxlK+7eNvGnheLGllkD3o7gvYQgF5l/41K28VWGo5pYkFj7FWDrkZwGRLqKPJ6BVrzTkvKIlas2iyBHS03FH0uZABMsQeZJj8n4lqOwHsCvWyoUUeLWBGImZH58KbHFpJDcFh7QPCo44s0ynIyRdYz/Jc8jG2lWXcBYjxkGxj8UtJMD0AR5Q5gepEI4WYl+ONb+d9tNAgV1rBbnrjOCmnBOpCYrrQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from VE1EUR01FT021.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::3c) by VE1EUR01HT003.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Sun, 1 Mar 2020 17:24:49 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (10.152.2.52) by VE1EUR01FT021.mail.protection.outlook.com (10.152.2.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14 via Frontend Transport; Sun, 1 Mar 2020 17:24:49 +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; Sun, 1 Mar 2020 17:24:47 +0000 Received: from [192.168.1.101] (92.77.140.102) by ZR0P278CA0042.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15 via Frontend Transport; Sun, 1 Mar 2020 17:24:44 +0000 From: Bernd Edlinger To: Aleksa Sarai CC: Jonathan Corbet , Alexander Viro , Andrew Morton , Alexey Dobriyan , "Eric W. Biederman" , Thomas Gleixner , Oleg Nesterov , Frederic Weisbecker , Andrei Vagin , Ingo Molnar , "Peter Zijlstra (Intel)" , Yuyang Du , David Hildenbrand , Sebastian Andrzej Siewior , Anshuman Khandual , David Howells , Jann Horn , James Morris , Kees Cook , Greg Kroah-Hartman , Shakeel Butt , Christian Brauner , Jason Gunthorpe , Christian Kellner , Andrea Arcangeli , "Dmitry V. Levin" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] exec: Fix a deadlock in ptrace Thread-Topic: [PATCH] exec: Fix a deadlock in ptrace Thread-Index: AQHV77xesuLGQPzl+kmhVsL8mVFku6gz2HmAgAAkpYA= Date: Sun, 1 Mar 2020 17:24:47 +0000 Message-ID: References: <20200301151333.bsjfdjcjddsza2vn@yavin> In-Reply-To: <20200301151333.bsjfdjcjddsza2vn@yavin> Accept-Language: en-US, en-GB, de-DE Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-clientproxiedby: ZR0P278CA0042.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::11) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) x-incomingtopheadermarker: OriginalChecksum:84A3901A076AB53D05A0AD9F0E02458E9F79D9F6F8EBBB97D98BAF4C15C8B0CC;UpperCasedChecksum:AD89026F0E9B2B911C3FEF288A3B3FF272E570DC4DCC5247810B0915AAADF0F0;SizeAsReceived:8883;Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [c0ZepwXUpAkvv9oAscgeFm8gp9kmPJze] x-microsoft-original-message-id: x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: a6e343f8-8863-41be-c1fe-08d7be05703f x-ms-traffictypediagnostic: VE1EUR01HT003: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lxeD75mrxE44E9JPKOdSf3Ny/xWE3YAJQgd7F5IJmcd1GizXhk9EuThXVJjMwgyPG7K6JqEuXVkezZ5UA+NbfOm5yVxjGbQzjktBX179lYNR3u4D8ekLTLKjcOw5mG0KHPlFKTCu9y+Ab54UK48x7RlblJVYj41Z9fjZV/ixabHVafzGUa5aaqb2lO/LbCdn1xi91DOCOSMK6hk6xxFwoQzHJUm2sNueVBT8nUR4EiA= x-ms-exchange-antispam-messagedata: xyt+MGx4P8iQuTw9JPSchQOpLLzQHH1O/i858Zu6CgPuXa0N+iURS1vZkmY6gpszxb4XtRSgFZAej4L2p9KZaU+BUjaS04nPlVMR0BPaeXFsdg9tnmYYAqEdXXkS0w4mdss8DaGRJMeuKcjCWs4XUg== x-ms-exchange-transport-forked: True Content-Type: multipart/mixed; boundary="_003_AM6PR03MB5170D68B5010FCA627A603F8E4E60AM6PR03MB5170eurp_" 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: a6e343f8-8863-41be-c1fe-08d7be05703f X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2020 17:24:47.1160 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --_003_AM6PR03MB5170D68B5010FCA627A603F8E4E60AM6PR03MB5170eurp_ Content-Type: text/plain; charset="Windows-1252" Content-ID: <2F409FD66778234EB3E74073524A1968@eurprd03.prod.outlook.com> Content-Transfer-Encoding: quoted-printable Hi Aleksa, On 3/1/20 4:13 PM, Aleksa Sarai wrote: > On 2020-03-01, Bernd Edlinger wrote: >> This fixes a deadlock in the tracer when tracing a multi-threaded >> application that calls execve while more than one thread are running. >> >> I observed that when running strace on the gcc test suite, it always >> blocks after a while, when expect calls execve, because other threads >> have to be terminated. They send ptrace events, but the strace is no >> longer able to respond, since it is blocked in vm_access. >> >> The deadlock is always happening when strace needs to access the >> tracees process mmap, while another thread in the tracee starts to >> execve a child process, but that cannot continue until the >> PTRACE_EVENT_EXIT is handled and the WIFEXITED event is received: >> >> strace D 0 30614 30584 0x00000000 >> Call Trace: >> __schedule+0x3ce/0x6e0 >> schedule+0x5c/0xd0 >> schedule_preempt_disabled+0x15/0x20 >> __mutex_lock.isra.13+0x1ec/0x520 >> __mutex_lock_killable_slowpath+0x13/0x20 >> mutex_lock_killable+0x28/0x30 >> mm_access+0x27/0xa0 >> process_vm_rw_core.isra.3+0xff/0x550 >> process_vm_rw+0xdd/0xf0 >> __x64_sys_process_vm_readv+0x31/0x40 >> do_syscall_64+0x64/0x220 >> entry_SYSCALL_64_after_hwframe+0x44/0xa9 >> >> expect D 0 31933 30876 0x80004003 >> Call Trace: >> __schedule+0x3ce/0x6e0 >> schedule+0x5c/0xd0 >> flush_old_exec+0xc4/0x770 >> load_elf_binary+0x35a/0x16c0 >> search_binary_handler+0x97/0x1d0 >> __do_execve_file.isra.40+0x5d4/0x8a0 >> __x64_sys_execve+0x49/0x60 >> do_syscall_64+0x64/0x220 >> entry_SYSCALL_64_after_hwframe+0x44/0xa9 >> >> The proposed solution is to have a second mutex that is >> used in mm_access, so it is allowed to continue while the >> dying threads are not yet terminated. >> >> I also took the opportunity to improve the documentation >> of prepare_creds, which is obviously out of sync. >> >> Signed-off-by: Bernd Edlinger >=20 > I can't comment on the validity of the patch, but I also found and > reported this issue in 2016[1] and the discussion quickly veered into > the problem being more complicated (and uglier) than it seems at first > glance. >=20 > You should probably also Cc stable, given this has been a long-standing > issue and your patch doesn't look (too) invasive. >=20 I am fully aware that this patch won't fix the case then PTRACE_ACCESS is r= acing with de_thread. But I don't see a problem with allowing vm access based on= the current credentials as they are still the same until de_thread is done with= it's job. And in a practical way this fixes 99% of the real problem here, as it= only happens since strace is currently tracing something and needs access to the= parameters in the tracee's vm space. Of course you could fork the strace process to do any PTRACE_ACCESS when ne= cessary, and, well, maybe that would fix the remaining problem here... However before I considered changing the kernel for this I tried to fix thi= s within strace. First I tried to wait in the signal handler. See attached strace-patch-1.diff, but that did not work, BUT I think it is possible that= your patch you proposed previously would actually make it work. I tried then another approach, using a worker thread to wait for the childs= , but it did only work when I remove PTRACE_O_TRACEEXIT from the ptrace optio= ns, because the ptrace(PTRACE_SYSCALL, pid, 0L, 0L) does not work in the worker= thread, rv =3D -1, errno =3D 3 there, and unfortunately the main thread is blocked = and unable to do the ptrace call, that makes the thread continue. So I consider that second patch really ugly, and wouldn't propose something= like that seriously. @@ -69,7 +71,7 @@ cflag_t cflag =3D CFLAG_NONE; unsigned int followfork; unsigned int ptrace_setoptions =3D PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEE= XEC - | PTRACE_O_TRACEEXIT; + ;//| PTRACE_O_TRACEEXIT; unsigned int xflag; bool debug_flag; bool Tflag; so it only works because of this line, without that it is not able to make = the thread continue after the PTRACE_EVENT_EXIT.=20 Thanks Bernd. > [1]: https://lore.kernel.org/lkml/20160921152946.GA24210@dhcp22.suse.cz/ >=20 --_003_AM6PR03MB5170D68B5010FCA627A603F8E4E60AM6PR03MB5170eurp_ Content-Type: text/x-patch; name="strace-patch-1.diff" Content-Description: strace-patch-1.diff Content-Disposition: attachment; filename="strace-patch-1.diff"; size=7652; creation-date="Sun, 01 Mar 2020 17:24:46 GMT"; modification-date="Sun, 01 Mar 2020 17:24:46 GMT" Content-ID: Content-Transfer-Encoding: base64 ZGlmZiAtdXIgc3RyYWNlLTUuNS9kZWxheS5oIHN0cmFjZS01LjUueC9kZWxheS5oCi0tLSBzdHJh Y2UtNS41L2RlbGF5LmgJMjAxOS0wOC0wNiAxNTozODoyMC4wMDAwMDAwMDAgKzAyMDAKKysrIHN0 cmFjZS01LjUueC9kZWxheS5oCTIwMjAtMDItMjkgMTI6Mzk6NTEuNTYzMTEwODI3ICswMTAwCkBA IC0xNCw1ICsxNCw2IEBACiB2b2lkIGRlbGF5X3RpbWVyX2V4cGlyZWQodm9pZCk7CiB2b2lkIGFy bV9kZWxheV90aW1lcihjb25zdCBzdHJ1Y3QgdGNiICopOwogdm9pZCBkZWxheV90Y2Ioc3RydWN0 IHRjYiAqLCB1aW50MTZfdCBkZWxheV9pZHgsIGJvb2wgaXNlbnRlcik7CitpbnQgbXlfd2FpdHBp ZChpbnQsIGludCosIGludCk7CiAKICNlbmRpZiAvKiAhU1RSQUNFX0RFTEFZX0ggKi8KZGlmZiAt dXIgc3RyYWNlLTUuNS9maWx0ZXJfc2VjY29tcC5jIHN0cmFjZS01LjUueC9maWx0ZXJfc2VjY29t cC5jCi0tLSBzdHJhY2UtNS41L2ZpbHRlcl9zZWNjb21wLmMJMjAyMC0wMi0wNiAxNjoxNjoxNy4w MDAwMDAwMDAgKzAxMDAKKysrIHN0cmFjZS01LjUueC9maWx0ZXJfc2VjY29tcC5jCTIwMjAtMDIt MjkgMTI6NDI6NDMuMTg0MTIwMjYzICswMTAwCkBAIC0xOSw2ICsxOSw3IEBACiAjaW5jbHVkZSAi bnVtYmVyX3NldC5oIgogI2luY2x1ZGUgInN5c2NhbGwuaCIKICNpbmNsdWRlICJzY25vLmgiCisj aW5jbHV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RfcnVzYWdlW291dF9pZHhdOworCQkJ b3V0X2lkeCsrOworCQl9CiAJCXdhaXRfbm9oYW5nID0gdHJ1ZTsKIAl9CiAKQEAgLTMwMTksNyAr MzExMiw3IEBACiAKIAljYXNlIFRFX1NUT1BfQkVGT1JFX0VYSVQ6CiAJCXByaW50X2V2ZW50X2V4 aXQoY3VycmVudF90Y3ApOwotCQlicmVhazsKKwkJcmV0dXJuIHRydWU7CiAJfQogCiAJLyogV2Ug aGFuZGxlZCBxdWljayBjYXNlcywgd2UgYXJlIHBlcm1pdHRlZCB0byBpbnRlcnJ1cHQgbm93LiAq LwpAQCAtMzEzOCw3ICszMjMxLDcgQEAKIAlpZiAoc2hhcmVkX2xvZyAhPSBzdGRlcnIpCiAJCWZj bG9zZShzaGFyZWRfbG9nKTsKIAlpZiAocG9wZW5fcGlkKSB7Ci0JCXdoaWxlICh3YWl0cGlkKHBv cGVuX3BpZCwgTlVMTCwgMCkgPCAwICYmIGVycm5vID09IEVJTlRSKQorCQl3aGlsZSAobXlfd2Fp dHBpZChwb3Blbl9waWQsIE5VTEwsIDApIDwgMCAmJiBlcnJubyA9PSBFSU5UUikKIAkJCTsKIAl9 CiAJaWYgKHNpZykgewo= --_003_AM6PR03MB5170D68B5010FCA627A603F8E4E60AM6PR03MB5170eurp_ Content-Type: text/x-patch; name="strace-patch-2.diff" Content-Description: strace-patch-2.diff Content-Disposition: attachment; filename="strace-patch-2.diff"; size=7878; creation-date="Sun, 01 Mar 2020 17:24:46 GMT"; modification-date="Sun, 01 Mar 2020 17:24:46 GMT" Content-ID: <97331293684C6F48AEA0FCA63C75ADA9@eurprd03.prod.outlook.com> Content-Transfer-Encoding: base64 ZGlmZiAtdXIgc3RyYWNlLTUuNS9kZWxheS5oIHN0cmFjZS01LjUueS9kZWxheS5oCi0tLSBzdHJh Y2UtNS41L2RlbGF5LmgJMjAxOS0wOC0wNiAxNTozODoyMC4wMDAwMDAwMDAgKzAyMDAKKysrIHN0 cmFjZS01LjUueS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