Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp935040ybz; Wed, 29 Apr 2020 12:01:54 -0700 (PDT) X-Google-Smtp-Source: APiQypL4CdIUaDK70glydzM8ojtc41vcOHa+dJKZKApfndrMnZcIoIzSSn8ZJk1bLb19TETqjQkG X-Received: by 2002:a17:906:4907:: with SMTP id b7mr3793941ejq.279.1588186914234; Wed, 29 Apr 2020 12:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588186914; cv=none; d=google.com; s=arc-20160816; b=OPv1yEC/jtPNwZHQwZwCLYmv1s7gWC+EfXlZsCPGOmxW/W7I50/n9RmDT/e+7MbxzU gfAmKL1cIqRsoOVl1RcVBwhC92BZNJeDZMiXzqVF1Fp7+Xca0O8acFYB/9GL6sVUxf36 aClq6jFD04adMULjy1xF2kupt/nLal/xxrJG6W1R/9sGuwSPT4vISMFW6+bWyipDqK1y yvU6gFY83OJFKSXpUmCrMg3eAww/yQX+JjEZPSbrccmg7Ym8MOFRkY0iWCqVb+hGefSx TQxQlPlMX3WRSqri5GF55+Wfc0/qUYxOYZ5Rzw7upxBkGYomTcDuFqUtnKYEAHYc8Yeg KiPw== 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=XHNO8ffSQj18wVxeNpd2+QoUtJ2NA8Wf/sg3u3S6tQ0=; b=SQ2AitcXDX0iL+QfRkP4v1zeBqu66wiWGWl3k2Hnli1SeLaXuKYcZKrIg1UUAAg9j8 Hh1IoecJfKBxCu7oHbbKSYb2aUWZCWoN9cUerrKs6RdOoBPcgjsjDsE87FGhXjgJcZAQ 6zFULY907YNgKLPfntw7UKzXqDNulV+eSGTP9MDWqSynm7ueUOOUO+qrFGMh/O4Y9GT2 xCiX3jHKg2VKvgtDoR2Z+frMWRVfJHy6rF+RN/cfyMb2+OUrVWlWWwvhRHf86SrJbaN2 FLa0zcSxntbciBLfX+OZMW/w21GV+HM38m3d1llEm/tqo/JCVCsZnzULn1j7D64KmiFD tuJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=hWdULCIR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si4251578eja.355.2020.04.29.12.01.27; Wed, 29 Apr 2020 12:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=hWdULCIR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbgD2S5v (ORCPT + 99 others); Wed, 29 Apr 2020 14:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726423AbgD2S5v (ORCPT ); Wed, 29 Apr 2020 14:57:51 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECB7FC03C1AE for ; Wed, 29 Apr 2020 11:57:50 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id j14so2609843lfg.9 for ; Wed, 29 Apr 2020 11:57:50 -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=XHNO8ffSQj18wVxeNpd2+QoUtJ2NA8Wf/sg3u3S6tQ0=; b=hWdULCIRoYuwqiVb+98eRdgs9Csgxr5Iv08spzH3mrwrkcq2EcJnXV/zsGjDHKhK2G BcJWT65MlqCwRJKdxn7pMJNONqW1o9AFzJnCHA2JIy+SEwL90weMJyTTkMDX+1bzltLY ICRygew5dEFIF9ElXfXtYyimXjIdj9uVNT+9o= 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=XHNO8ffSQj18wVxeNpd2+QoUtJ2NA8Wf/sg3u3S6tQ0=; b=SZHE7VBtZQAQ+qMvdTEbOyAb/7/0fhSndXdx6hoBrimBAa+YaUVoaajCaUONxrAj1q nQpwJzNTmD5UF94EI0VHaNqyMvnQVsG2R9aBnEDqjvXgx4coDp3/WRLjsRIuuJahk9o6 Rz43Z9invqKM0AJuznQZF/eMcjaAhuk0NBZjEHrPB4Ki1G3KhhKN/EK7Bn2mE7OebsOB qU6FVkqYchXfoPrpV9OUmdfdS34HqEbB9gRzlSvZokuQexWilraqylHUKfoVZcDHrieg 9tsmm5bVo+Yw4UzrH/QJzd3nHVkEd7lCes1QEmlDj82+oD/7kFHjBavFtL8YDOIFlzFa lmig== X-Gm-Message-State: AGi0PuYv91Szauo5eEIUKa4ByoXKD1tRVD0br8iamlBrJeSEXdclybu5 ff26iUZZ/+TUpf4vMjvb/BE8B8DxHFY= X-Received: by 2002:a19:10:: with SMTP id 16mr2251403lfa.145.1588186668450; Wed, 29 Apr 2020 11:57:48 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id u6sm2815537ljd.68.2020.04.29.11.57.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 11:57:47 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id g4so3818885ljl.2 for ; Wed, 29 Apr 2020 11:57:47 -0700 (PDT) X-Received: by 2002:a05:651c:319:: with SMTP id a25mr20334087ljp.209.1588186666646; Wed, 29 Apr 2020 11:57:46 -0700 (PDT) MIME-Version: 1.0 References: <87imi8nzlw.fsf@x220.int.ebiederm.org> <20200411182043.GA3136@redhat.com> <20200412195049.GA23824@redhat.com> <20200428190836.GC29960@redhat.com> In-Reply-To: From: Linus Torvalds Date: Wed, 29 Apr 2020 11:57:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 To: Jann Horn Cc: Oleg Nesterov , Bernd Edlinger , "Eric W. Biederman" , 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 Wed, Apr 29, 2020 at 11:33 AM Jann Horn wrote: > > > That sequence count approach would be a much simpler change. > > In that model, what should happen if someone tries to attach to a > process that's in execve(), but after the point of no return in > de_thread()? "Abort" after the point of no return normally means > force_sigsegv(), right? It would by definition have to check the sequence number at the end of install_exec_creds() (where we currently release the cred_guard_mutex). And yes, that's after the point of no return, so it would cause the usual "kill the process". We could check earlier too (while still able to return errors) and return -EAGAIN or something, but that wouldn't obviate the need for that final check, iut would just shrink the window for the "fatal exec" case. Linus