Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4751211ybb; Tue, 7 Apr 2020 13:48:53 -0700 (PDT) X-Google-Smtp-Source: APiQypISXgwXQkFBZcZ0PR+J5bK9diG5ohjlc6V4Qm6sIpeloTmfT12mkK3mdGBuUG66ExuV2kwr X-Received: by 2002:a9d:264a:: with SMTP id a68mr3088411otb.176.1586292533499; Tue, 07 Apr 2020 13:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586292533; cv=none; d=google.com; s=arc-20160816; b=bj4dqoWBORhJ8QjgjkvvOsaTSy2kQrDmnysJCxXHDFIjxNQ2j3+EWJR4T4BjpFYntl QWayyp80mE0N2RquS/c476cV3DUZNxHrXduJBUBpDT70JPBjpzao/Z4rXaVdg6v/AmcN +KUAc67F+Cm/RYoL+OV29R602yZs+Jpn2W0ZDEyHxv4TgfM7fcJl+QzLiOLGcy5xL6Xx bD5leOvaXVs88agW+Ejl6npcVhcJ4gVCxmRFqvdsqW6rTE70q1YQ/wofJ9Cy3mb1HCKs yyqkXkxTOMNFe7LM0C2nSWHx25MlPzf98PhSofiFJ4BqKrhjQrbjo+TiXnE9FFWRHOBf eTRw== 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=0HjyJmpuP/fheL56eiDsEL3j2Jeu/bd9xUqsyeAAnTM=; b=LESh+JnknSO81ng116jxoSMM0WunlbaQQ4UZy81TZscFCxaqShiH96SNh2gvzfuama MBugRQ7MU+d5fu6NFUNAV8X/OmVy0vaY5Vgd1ylWp5aegjwVEoOZSmauZ5YKPPqQ1QV9 jI2hrqVlIX2X3/J3UBz9gqenq9QEMsQbXb1MIrTQatu8yeNb0HtnGjP/XjvTfbyV5X6g HmNqHznJ6o013+JfsVrQWX8Djg60Fhp1iKImkX1Eql3AQSaOQnSRT2RPavNSE4dgIjL+ Kut6eqTiWH447nSU2aMuB22cP2USzz03bQ6n5rzD6HXE7tTwwbQr9tDDf+DwkkGjTSIj MhSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FQhyz95E; 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 f9si1870888otc.162.2020.04.07.13.48.38; Tue, 07 Apr 2020 13:48: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=FQhyz95E; 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 S1726416AbgDGUsE (ORCPT + 99 others); Tue, 7 Apr 2020 16:48:04 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:40464 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbgDGUsE (ORCPT ); Tue, 7 Apr 2020 16:48:04 -0400 Received: by mail-lj1-f194.google.com with SMTP id 142so733774ljj.7 for ; Tue, 07 Apr 2020 13:48:01 -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=0HjyJmpuP/fheL56eiDsEL3j2Jeu/bd9xUqsyeAAnTM=; b=FQhyz95ErvyUTVGyfMDMjF6va9oPn5G9QQis7cMRsGgxDIlUsuR1VPQIJcvsMd+KCq 0iP/0/T9Jmk7j6bVuyAPuFSmCHiQ0xIfFLAeu2pHJH+OZduD+lXrUxG4XnL+i0voL1YP rrIyxNCOOm8Hwt3UhNhsZTM7/H0hggIN/mxg4= 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=0HjyJmpuP/fheL56eiDsEL3j2Jeu/bd9xUqsyeAAnTM=; b=JP9+oZXgLK/cRztn3TyssbpTOyt4FuH/PTxTYsnTmxw7JIni8RTXI2H3yoLoNNX6G3 8v/QC3pKBYstqX/UXNrvZy+pbnwluuPfw7VqZdCY1dCPCJNNMh5LvUcruZiJkFG7wmk+ NuROIycrtwfdBMQLaoIargXO9h5swQfFKgcpPYocR6ePMRI0W8LIg51JRBoeOxnJdBkl aEDTGsyn+V2lKv61zna0lZYTTZ1EN9slWCagY14sbn3NhoTH2UrWRaLtzhKpJHg6xWF6 hYx6zK4Jt4nj5q33zN23RRdBrPFiG2BAEln2AcIBhmJh0iEtbvcoBQRfAOOUQIPE+1oL Nktg== X-Gm-Message-State: AGi0PuasaAK9Y3PXuiFisYLv06Ag9frGR8s1s4ejg90to5NjDcEy7XWw im7hA+4HfSaD44JcW8+xhZmMBtunmM4= X-Received: by 2002:a05:651c:22e:: with SMTP id z14mr2768735ljn.64.1586292480080; Tue, 07 Apr 2020 13:48:00 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id i2sm150899ljb.50.2020.04.07.13.47.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Apr 2020 13:47:59 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id g27so5237500ljn.10 for ; Tue, 07 Apr 2020 13:47:58 -0700 (PDT) X-Received: by 2002:a2e:8911:: with SMTP id d17mr2932028lji.16.1586292478505; Tue, 07 Apr 2020 13:47:58 -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> In-Reply-To: From: Linus Torvalds Date: Tue, 7 Apr 2020 13:47:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 To: Bernd Edlinger Cc: "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 Tue, Apr 7, 2020 at 1:29 PM Bernd Edlinger wrote: > > Maybe, actually I considered this, but I was anxious that making something > that is so far not killable suddenly killable might break other things. I don't think it can. Basically, if you have a execve() and a setprocattr() racing, one or the other starts first. And if the execve() started first, then the setprocattr() thread would get killed by the execve(), and there's no serialization. So you might as well just say "it got killed before it even started to wait". So semantically, having a killable wait is basically exactly the same as losing the race - which wasn't ordered to begin with. It's not like anybody will see the return value - the thread that would have gotten the value got killed. So doing if (down_writel_killable(&credlock)) return -EINTR; may *look* like it's new semantics, but it isn't really. That EINTR error isn't visible to anybody, and everything looks absolutely identical to "execve() in the other thread started earlier and killed the thread even before it got to the system call". Linus