From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A75CDC54FD0 for ; Wed, 25 Mar 2020 15:13:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5D6B820719 for ; Wed, 25 Mar 2020 15:13:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D6B820719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xmission.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E3A426B000A; Wed, 25 Mar 2020 11:13:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC3C36B000C; Wed, 25 Mar 2020 11:13:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8B086B000D; Wed, 25 Mar 2020 11:13:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id AD3AA6B000A for ; Wed, 25 Mar 2020 11:13:09 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8AA6232069 for ; Wed, 25 Mar 2020 15:13:09 +0000 (UTC) X-FDA: 76634227698.13.army51_1b76ebde0085b X-HE-Tag: army51_1b76ebde0085b X-Filterd-Recvd-Size: 7972 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Mar 2020 15:13:08 +0000 (UTC) Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jH7iL-0000FW-EX; Wed, 25 Mar 2020 09:13:05 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jH7iK-00084e-3v; Wed, 25 Mar 2020 09:13:05 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Bernd Edlinger Cc: Greg Kroah-Hartman , Kirill Tkhai , Christian Brauner , Kees Cook , Jann Horn , 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 , James Morris , 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-api\@vger.kernel.org" References: Date: Wed, 25 Mar 2020 10:10:28 -0500 In-Reply-To: (Bernd Edlinger's message of "Fri, 20 Mar 2020 21:24:03 +0100") Message-ID: <871rpg8o7v.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1jH7iK-00084e-3v;;;mid=<871rpg8o7v.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+JEzuXaPnCFv9XVnwdfICRpMm6S2cfZJU= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH v6 00/16] Infrastructure to allow fixing exec deadlocks X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Bernd Edlinger writes: > This is an infrastructure change that makes way for fixing this issue. > Each patch was already posted previously so this is just a cleanup of > the original mailing list thread(s) which got out of control by now. > > Everything started here: > https://lore.kernel.org/lkml/AM6PR03MB5170B06F3A2B75EFB98D071AE4E60@AM6PR03MB5170.eurprd03.prod.outlook.com/ > > I added reviewed-by tags from the mailing list threads, except when > withdrawn. > > It took a lot longer than expected to collect everything from the > mailinglist threads, since several commit messages have been infected > with typos, and they got fixed without a new patch version. > > - Correct the point of no return. > - Add two new mutexes to replace cred_guard_mutex. > - Fix each use of cred_guard_mutex. > - Update documentation. > - Add a test case. > > Bernd Edlinger (11): > exec: Fix a deadlock in strace > selftests/ptrace: add test cases for dead-locks > mm: docs: Fix a comment in process_vm_rw_core > kernel: doc: remove outdated comment cred.c > kernel/kcmp.c: Use new infrastructure to fix deadlocks in execve > proc: Use new infrastructure to fix deadlocks in execve > proc: io_accounting: Use new infrastructure to fix deadlocks in execve > perf: Use new infrastructure to fix deadlocks in execve > pidfd: Use new infrastructure to fix deadlocks in execve > exec: Fix dead-lock in de_thread with ptrace_attach > doc: Update documentation of ->exec_*_mutex > > Eric W. Biederman (5): > exec: Only compute current once in flush_old_exec > exec: Factor unshare_sighand out of de_thread and call it separately > exec: Move cleanup of posix timers on exec out of de_thread > exec: Move exec_mmap right after de_thread in flush_old_exec > exec: Add exec_update_mutex to replace cred_guard_mutex > > Documentation/security/credentials.rst | 29 +++++-- > fs/exec.c | 122 ++++++++++++++++++++++-------- > fs/proc/base.c | 23 +++--- > include/linux/binfmts.h | 8 +- > include/linux/sched/signal.h | 17 ++++- > init/init_task.c | 3 +- > kernel/cred.c | 4 +- > kernel/events/core.c | 12 +-- > kernel/fork.c | 7 +- > kernel/kcmp.c | 8 +- > kernel/pid.c | 4 +- > kernel/ptrace.c | 20 ++++- > kernel/seccomp.c | 15 ++-- > mm/process_vm_access.c | 2 +- > tools/testing/selftests/ptrace/Makefile | 4 +- > tools/testing/selftests/ptrace/vmaccess.c | 86 +++++++++++++++++++++ > 16 files changed, 278 insertions(+), 86 deletions(-) > create mode 100644 tools/testing/selftests/ptrace/vmaccess.c Two small nits. - You reposted my patches with adding your signed-off-by - You reposted my patches and did not include a "From:" in the body so "git am" listed you as the author. I have fixed those up and will be merging this code to linux-next, unless you object. Eric