Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1875737ybb; Thu, 9 Apr 2020 10:37:53 -0700 (PDT) X-Google-Smtp-Source: APiQypL7OforCG/c9AaSzURWWI0X6s1ZnKNMw2lXX0KPTUYnIJ35MCd1cqGUGGOFDnflMWgfGhmk X-Received: by 2002:a0c:ea42:: with SMTP id u2mr1225766qvp.226.1586453873534; Thu, 09 Apr 2020 10:37:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586453873; cv=none; d=google.com; s=arc-20160816; b=fMaMUo+uINMJOXF0etyJH6oDrQstVrktz4la7I/AyBE7Kd7kFmR1Wo4+KMt6uVeKym CgioHC7fha2bxSHRgLlZq5SbGuPDiBVDgEk7sHtQi+m0YxTwHfc0RcuJxXeRGmsACtHA +yxAVW5WAUxFmFO1O8b3zPI8KzmTSsR53lCnJhgbhKW+ONUVOE+X2xR/V6dHLOJlwkur bbpMrS+P+nfk2c7yETuWg6J8BbjmTerhqBNiL5h2mQcA01aZqqJeh9K4cFG43KkbGled o5QSkE9F2nTVkdW0bCIwiG2guG14if/3IRygbh0mm7eSiImS0/+Fd9IZdyRHen/CNBS7 nVow== 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=drFY0cI76YFL+D475SkoScTlV6DBcXax20dn7m+LW8M=; b=ymYior+O65uNResE9OU5STcUZkDgum5aNjClOnaCNF1XSJt6BR4Kdcuta8SkkvNUM4 jZlE+MTOGLpUhQ4nat3z2T7EVi46ercVlapDAALFk+wn5ZjGC6tiCDnb167US9ZNMI6z Kv/4HOe/jVLFwU1FBeFfqjSZVIRn+uOsAyuzOmKMF+5q1vBq+7MWD7wYZQii1rGKFgcb VM9QMUNwUF24nrTSVCHLDEkT/qkvgbf7VFqu3mQzKcGUmSUa6dFzhjP7U4RdBZefLaX9 euhEhEFRa8P5C4MmUa/YQenQBzgcJGHHq6MDfixL/z954dajm3+zuNAVAx7dMiE6MlYz s3Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Njj3turU; 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 i14si3306538qtw.266.2020.04.09.10.37.37; Thu, 09 Apr 2020 10:37:53 -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=Njj3turU; 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 S1726571AbgDIRg1 (ORCPT + 99 others); Thu, 9 Apr 2020 13:36:27 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:36766 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbgDIRg0 (ORCPT ); Thu, 9 Apr 2020 13:36:26 -0400 Received: by mail-lf1-f67.google.com with SMTP id w145so283602lff.3 for ; Thu, 09 Apr 2020 10:36:26 -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=drFY0cI76YFL+D475SkoScTlV6DBcXax20dn7m+LW8M=; b=Njj3turU8V3Xh++Y8IkIN2C4y8WaBrdM2z4B1lfdk+QEuMhjsO+WVk2peac8Pc5M/2 8xQZfqy/GSdEhX5Q6l3oSJtgUecn84A+WXplS76nOV+kWCzsTudyejT+yCPNS4zLXDuq 0Gm7DPM6I/TLIao5CwvpmMnXH94Ba9DOy4PfY= 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=drFY0cI76YFL+D475SkoScTlV6DBcXax20dn7m+LW8M=; b=o9GJo5lwOyYcw4L0jAWWAQ0aXWAseWgPj4+/oiVwOtNTUkfRogkuk8YEVeeFrN7wNE bPHFYVVirOvujRRW6QnG10Pj+XYXUwZ8CixgbueLPSUzEAXS13LxSwte11eJFLcovA33 uYh1WkUdbZjFnA9FgItWjyGA09kbXZT1gglXXmqZpMI4D8gmVgbbtu2PFtJcRj5dnox6 L9pMe04+SmaglEuE7uV4B1BhcjcNm6ocmNC9IGyP3LQGhGSyke+DCk3JtSA2x1kIMIWB D+EhyVXAr2Njff/oSpQcbkrOVDyEc1MCqcXb6E2h0nbTbA7kAELsmnIPCQ2VxBvIjUyZ 83kg== X-Gm-Message-State: AGi0PuanEPktYLdE1Y4DFRrx6A5ZwZxBqeL4PoC5+3CYwcsGbGa/6bB0 oNONxgW7CrxcR67spvSDJii3lHP8+2w= X-Received: by 2002:a19:c3c5:: with SMTP id t188mr225408lff.199.1586453785009; Thu, 09 Apr 2020 10:36:25 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id o16sm16405840ljp.53.2020.04.09.10.36.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Apr 2020 10:36:24 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id n17so536022lji.8 for ; Thu, 09 Apr 2020 10:36:23 -0700 (PDT) X-Received: by 2002:a05:651c:50e:: with SMTP id o14mr520029ljp.241.1586453783326; Thu, 09 Apr 2020 10:36:23 -0700 (PDT) MIME-Version: 1.0 References: <87blobnq02.fsf@x220.int.ebiederm.org> <87lfnda3w3.fsf@x220.int.ebiederm.org> <87blo45keg.fsf@x220.int.ebiederm.org> <87v9maxb5q.fsf@x220.int.ebiederm.org> <87y2r4so3i.fsf@x220.int.ebiederm.org> <87wo6or3pg.fsf@x220.int.ebiederm.org> In-Reply-To: <87wo6or3pg.fsf@x220.int.ebiederm.org> From: Linus Torvalds Date: Thu, 9 Apr 2020 10:36:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 To: "Eric W. Biederman" Cc: Waiman Long , Ingo Molnar , Will Deacon , Bernd Edlinger , Linux Kernel Mailing List , Alexey Gladkov , Oleg Nesterov 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 Thu, Apr 9, 2020 at 10:06 AM Eric W. Biederman wrote: > > a) We must stop in PTRACE_EVENT_EXIT during exec or userspace *breaks*. > > Those are the defined semantics and I believe it is something > as common as strace that depends on them. Don't be silly. Of course we must stop IF THE TRACER IS ACTUALLY TRACING US. But that's simply not the case. The deadlock case is where the tracer is going through an execve, and the tracing thread is being killed. Claiming that "user space breaks" is garbage. User space cannot care. In fact, it's broken right now because it deadlocks, but it deadlocks becvause that code waits for absolutely no good reason. > b) Even if we added a test for our ptrace parent blocking in a ptrace > attach of an ongoing exec, it still wouldn't help. > > That ptrace attach could legitimately come after the thread in > question has stopped and notified it's parent it is stopped. What? The whole point is that the tracer _is_ the thing going through execve(), which is why you get the deadlock in the first place. You make no sense. If the tracer is somebody else, we wouldn't be deadlocking. We'd just be tracing. I really don't understand your arguments against my patch. They seem entirely nonsensical. Are we speaking past each other some way? Linus