Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1132984ybz; Wed, 29 Apr 2020 15:40:58 -0700 (PDT) X-Google-Smtp-Source: APiQypLPHNIxgNx8PFAxXVPNTw0d9BXHdAxze6+/5P85Qg8S7rm18Bgsebq2fLA49Dqv3ODY+i9y X-Received: by 2002:a50:ef0b:: with SMTP id m11mr204202eds.25.1588200058716; Wed, 29 Apr 2020 15:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588200058; cv=none; d=google.com; s=arc-20160816; b=wUI2lNhI3AWzU92fBwJqWd8rqh7KfRTCYDUZ3cqw8cQouzkpvpYjmhdxt2ebrAG20C h06GT4iKo3U5SfRMWBGBhC+I+cjBnxRFzP0XCQkY2W8z68CexV6X3bM0Cfz/iPaoU20D KBwFP0AGruc/7jo+tqSz1dxHu/I1yd6QWy1qMoeeCItA7o510C1uIYsehAEyBat1LYKH V6MNFhJcgWvz14R3dtK+efAu1Ri7hAlutC9Rdb2u9JpRIkCYpOYtRfhuu8otexCLdysA 4f51m3aswdJ+k18y1OTy0Dm1z15sbrnuC0uvqkyAgdVRQnRvxktTviZBNmEWxbq2vA+w EM3g== 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=a189DpcB+cR0a9sR1cWjCHfr0hMEKTR3GgF8mFeUCs0=; b=pv6Tl4i6NhrQmtPYvbBy9Xl5IzF4INxCNe/bIhe/ncW+z/m+nC1ylRkYN6+8MlwkNF JBkF9nnOntoF99HLbqh5ogQz50lkV+64BgTk4A4UBCPE2c8wDv4V8dJyFtzTm1rromLQ ITMjZfSsGlaiFIQFaBsZWbfAGXToZRTGo9tcWZ05xk5evZhq3X9bU2sKJaGQgQT7L79i 1MOc/5wNV/wPCOH4EpbNbL2069TGkV2JMvpup9Au3r3Jk1a4Bgy2GseH/Bg7vTNHyvSb jm23l0j3ttwfu/ocan1V198iwJx6hZVF5/envAcXVcuIwaAoM0sRu93c0ZOFJKKm4wKs TXnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=LLd9jSr+; 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 d23si4412112edn.363.2020.04.29.15.40.32; Wed, 29 Apr 2020 15:40:58 -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=LLd9jSr+; 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 S1726910AbgD2Wip (ORCPT + 99 others); Wed, 29 Apr 2020 18:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726164AbgD2Wip (ORCPT ); Wed, 29 Apr 2020 18:38:45 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E25EC03C1AE for ; Wed, 29 Apr 2020 15:38:43 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id u10so3091141lfo.8 for ; Wed, 29 Apr 2020 15:38:43 -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=a189DpcB+cR0a9sR1cWjCHfr0hMEKTR3GgF8mFeUCs0=; b=LLd9jSr+Bqmzh6IHdgIqt/bdYR9XqhcRoXQb1O694fr+x8hPsgulwZSwk38Cmfh/TG /WtyJkaNdWvJaGMbaMjeU+mE2P68xJnC2IwfxBUrOB9bzPuoMIecaAUWsMK+67szAyVB jEJi7LLcwTgwKmTOYlQIgFOwXcjzAK6wd6wQE= 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=a189DpcB+cR0a9sR1cWjCHfr0hMEKTR3GgF8mFeUCs0=; b=jc38yLmHvgWNS/dmMsNN/J/sW15Vmkp4iD6yhzCWgtpdh2S10r4XN93W0GHXCQetUM ZwsYQSW+TwVTSEmIsfDHwKjuX7A5SKRh+P5Qu3E/R0f+BW4+hIeCj/MbPU7GB8WYcwjF cD0y8RUBv/jFnv46DBgkvzh6Fymjn/mX81aBCSgyjzIXfKOpkEVzFStyM8rjUSAAaCnf 9tMH4UXRcMOLBHuq8xq96gMRzZdsHh2Ca9q+Idv9chzAuD2AzgiLs7Ej7Uvp15mvSXIV RSkL5dpE6cGDrRV6tC97Rs9IzCoFMwj8N4Gvn5Bd42qGW/w9UCj8Zj2Yf2Z2Mo8LmSox TnvA== X-Gm-Message-State: AGi0PuZWxjIr0eZ1LhVVPXRVpju7x3DVn33UgJExGTlLQxeNB4Hf95ZY OFqHhC5QydRDZoU2hJXizO7EfR0hzxQ= X-Received: by 2002:a19:ee06:: with SMTP id g6mr59465lfb.90.1588199920814; Wed, 29 Apr 2020 15:38:40 -0700 (PDT) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id p14sm3442551lfe.87.2020.04.29.15.38.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 15:38:39 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id w20so4440675ljj.0 for ; Wed, 29 Apr 2020 15:38:39 -0700 (PDT) X-Received: by 2002:a2e:814e:: with SMTP id t14mr281196ljg.204.1588199918722; Wed, 29 Apr 2020 15:38:38 -0700 (PDT) MIME-Version: 1.0 References: <20200411182043.GA3136@redhat.com> <20200412195049.GA23824@redhat.com> <20200428190836.GC29960@redhat.com> In-Reply-To: From: Linus Torvalds Date: Wed, 29 Apr 2020 15:38:21 -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: Jann Horn , Oleg Nesterov , "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 12:23 PM Bernd Edlinger wrote: > > By the way, all other attempts to fix it look much more dangerous > than my initially proposed patch, you know the one you hated, but > it does work and does not look overly complicated either. I don't think it works. The whole "take lock, release it in the middle, then re-take it" is fundamentally a broken model. We've never had it work well, and it tends to have subtle issues. That's particularly true when you then open-core the (only) acceptable sequence something like five times. > What was the reason why that cannot be done this way? If it had introduced a new locking model, and new locking helpers for that model, with a comment in _one_ place, and nobody doing the ad-hoc locking on their own, that might be more acceptable. But that's not what that patch did. No way will I take something that is so fragile and hacky, and repeats the hack N times. If you do it properly, with a helper function instead of repeating that fragile nasty thing, maybe it will look better to me. That said, locks that get released in the middle aren't really locks. But at least if the only way to take that lock had the "oh, this lock is in that inconsistent state, I will return -EAGAIN", that would be one thing. But when you have N different users and rely on all of them getting that special semantic right, you're doing something wrong. Linus