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 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 04564C4CECC for ; Mon, 27 Apr 2020 20:27:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E02692074F for ; Mon, 27 Apr 2020 20:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbgD0U1R (ORCPT ); Mon, 27 Apr 2020 16:27:17 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:38562 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbgD0U1Q (ORCPT ); Mon, 27 Apr 2020 16:27:16 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTALP-0002P1-Fx; Mon, 27 Apr 2020 14:27:11 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jTALO-0000RH-Fn; Mon, 27 Apr 2020 14:27:11 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Oleg Nesterov Cc: LKML , Linux FS Devel , Alexey Dobriyan , Alexey Gladkov , Andrew Morton , Alexey Gladkov , Linus Torvalds , Thomas Gleixner References: <20200419141057.621356-1-gladkov.alexey@gmail.com> <87ftcv1nqe.fsf@x220.int.ebiederm.org> <87wo66vvnm.fsf_-_@x220.int.ebiederm.org> <20200424173927.GB26802@redhat.com> <87mu6ymkea.fsf_-_@x220.int.ebiederm.org> <87r1w8ete7.fsf@x220.int.ebiederm.org> Date: Mon, 27 Apr 2020 15:23:57 -0500 In-Reply-To: <87r1w8ete7.fsf@x220.int.ebiederm.org> (Eric W. Biederman's message of "Mon, 27 Apr 2020 12:21:52 -0500") Message-ID: <87v9lkbrtu.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=1jTALO-0000RH-Fn;;;mid=<87v9lkbrtu.fsf@x220.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+rFpxBVGQYkwi+81h5QUMxWKfMmzPUaw8= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH v3] proc: Ensure we see the exit of each process tid exactly X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ebiederm@xmission.com (Eric W. Biederman) writes: > Take a good look over the code base and see if I can see any more > issues like was found in next_tgid and repost the core patches. Oleg, I am reading through kernel/ptrace.c and I am seeing a lot of: spin_lock(&child->sighand->siglock); In places where I don't see anything guaranteeing the child is stopped such as ptrace_freeze_traced. Are all of those places safe or do some of the need to be transformed into lock_task_sighand in case the process is current running? I might just be reading the code to quickly and missing what keeps the code from executing exec and changing sighand. Eric