Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1774659ybb; Sat, 11 Apr 2020 11:30:54 -0700 (PDT) X-Google-Smtp-Source: APiQypJI1VvhqeBHT1Hfp/7oZnLJuqJubBHg8oZRd7Kie28ou20XANVfhfhpCs/JQceFG90l4Uws X-Received: by 2002:a37:5d8:: with SMTP id 207mr9704260qkf.80.1586629854080; Sat, 11 Apr 2020 11:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586629854; cv=none; d=google.com; s=arc-20160816; b=mQEjYxCtSU4MAscn6gBB3al/ngGLezE+Ma3KnG4Ixyoefij1hv+zmMHjoC67MEXL5Y iZHlczXYYtc0nUtW6Z/ftLlvhdBPglIPXFwEhHsBNcvxDutWa0jKxFN1t5S0S2Ktrbuj nR37dEn0yQaB0nnVuIJQjaj6NYSjM9kdpGQ90308SHGqchlZ4VVRWDfpT/zKKDTAHo2e z9sde6LDo5uQRM4+WN00vR+Whn3QIGhaxNZUlgoh35JLWTllGU6VKfhw94CH8sAIJbR6 mqwALRmdKcNjlDG83VPTMKZxJursljH7Uoqng1Lm8FddcKPKxgnMFATFVD6JkUGrHSwC h2LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Sxd7h+PAeAiaXCgNz53g2fl/gtP8m/YpMLJIBPGjhWk=; b=hJh278NWdbluT49JEU4lxE+uafGpyNlUrb70b585L+Xj33dlm1jbO7uKvdKp3+KNIo sh+XqqyWd0r01g8ihMqfB44VY4Pt37o9WKPfkhvdiODEqXqMP1F9VzabJ9FjQ7j1u7+c zwvkWo/RzQAmGjjQ8U7VDEGMD05V0kcE10f8KSNFQ/xwwnaXNfXp3Cs/V644qoQoQ2XM YHcdqGY6z2uMKd5XmqFSjd40ZeJFfK8GsSDe9T/VILXUTeZc4PyDxR1ORKXuheH9Wp6d NUUMK92NdbJFydQV6lvIElEC1+96V7fuHdJEXn1ZNKooNGD6Ejh0/SJLuGhyw6Lujeaz m6pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Yo/TxDg8"; 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 q29si3179431qtl.315.2020.04.11.11.30.39; Sat, 11 Apr 2020 11:30:54 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Yo/TxDg8"; 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 S1726712AbgDKS30 (ORCPT + 99 others); Sat, 11 Apr 2020 14:29:26 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38586 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbgDKS3Z (ORCPT ); Sat, 11 Apr 2020 14:29:25 -0400 Received: by mail-lf1-f65.google.com with SMTP id l11so3593205lfc.5 for ; Sat, 11 Apr 2020 11:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Sxd7h+PAeAiaXCgNz53g2fl/gtP8m/YpMLJIBPGjhWk=; b=Yo/TxDg8wvuSnyo5yX3+SEqC3HPBVbPteJaCds7SQ3K/HwOt7suqJzgY9WGPY4VEEo 6Uyg9jTxWqqRED48pwpQ3E21dLX1Rge5mBDNNdyObtLMcqjV5RGc8mlb7SscoDO3sJPZ WBnpY3MIfSzTOxzOsDBGov0PmQaaWkOkF9cRc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Sxd7h+PAeAiaXCgNz53g2fl/gtP8m/YpMLJIBPGjhWk=; b=k7mPhyr+TQLoMW5iR18Yxsi2V/HBCppLj/CD9xfgMIF61V03ygCD83Hz52ycIr2rb9 t/YO2nqFgOJHfA+c54sir+eOnZc9qfF9F0VujyyCIs9V9FwhhCVU3j7X42hQq/GTvsZA tMA2I0xXIRZTTCmaPDJPgf68iliAvnUDK4galWD+nMa1fC5h4SuBGWTbg74wh0vk+tQC p5UQBm3nsUVgSEpeVJxn46m5d6bBL7n0gNy3ImCB218vv3GVtLVflycmsRiT7ohoTR31 uYtLo2zJaxjYTcEKc75f3usxJwMWcA9t4ak5aJeDYpwBQZo629oVXKZ1/Z5vLJJ9clPV lxxg== X-Gm-Message-State: AGi0PuYBhOFbXwpGfZ+h+1B+PkLxHmpbyQL01qKDOxRkIBZs39VEq0J0 b/3UwbDxzuJTFyVXwTwKSZr8kLaRuHU= X-Received: by 2002:ac2:5684:: with SMTP id 4mr5786844lfr.88.1586629763143; Sat, 11 Apr 2020 11:29:23 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id j22sm4343420lfg.96.2020.04.11.11.29.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Apr 2020 11:29:22 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id m8so4995379lji.1 for ; Sat, 11 Apr 2020 11:29:21 -0700 (PDT) X-Received: by 2002:a2e:b619:: with SMTP id r25mr6374948ljn.150.1586629761353; Sat, 11 Apr 2020 11:29:21 -0700 (PDT) MIME-Version: 1.0 References: <87imi8nzlw.fsf@x220.int.ebiederm.org> <20200411182043.GA3136@redhat.com> In-Reply-To: <20200411182043.GA3136@redhat.com> From: Linus Torvalds Date: Sat, 11 Apr 2020 11:29:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 To: Oleg Nesterov Cc: "Eric W. Biederman" , Bernd Edlinger , Waiman Long , Ingo Molnar , Will Deacon , Linux Kernel Mailing List , Alexey Gladkov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 11, 2020 at 11:21 AM Oleg Nesterov wrote: > > On 04/09, Linus Torvalds wrote: > > > > (1) have execve() not wait for dead threads while holding the cred > > mutex > > This is what I tried to do 3 years ago, see Well, you did it differently - by moving the "wait for dead threads" logic to after releasing the lock. My simpler patch was lazier - just don't wait for dead threads at all, since they are dead and not interesting. Because even if it's Easter weekend, those threads are not coming back to life ;) You do say in that old patch that we can't just share the signal state, but I wonder how true that is. Sharing it with a TASK_ZOMBIE doesn't seem all that problematic to me. The only thing that can do is getting reaped by a later wait. That said, I actually am starting to think that maybe execve() should just try to reap those threads instead, and avoid the whole issue that way. Basically my "option (2)" thing. Sure, that's basically stealing them from the parent, but 'execve()' really is special wrt threads, and the parent still has the execve() thread itself. And it's not so different from SIGKILL, which also forcibly breaks off any ptracer etc without anybody being able to say anything about it. Linus