Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3190663pxt; Mon, 9 Aug 2021 20:03:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytSgYYVntu29ZQ0jjeHBJEss2AhtaZZOUxq/MMVcF401tBo88bPpKoyjvGcOiu9s4uUYYO X-Received: by 2002:aa7:c603:: with SMTP id h3mr2024376edq.165.1628564596627; Mon, 09 Aug 2021 20:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628564596; cv=none; d=google.com; s=arc-20160816; b=xit92nHE5TBhK3yu+tFooQznoM+a7EpyDnaQoORnFOTGobMAYH4PBXS976lGqgaYT3 pAfikoNnvOoYlYCyQDku1eF/aXwiaTbMtQrPeCiWMMg5/iyqyFG+xY2xRG8Bj/w2T/Z0 MAbfL8mufRjIX5+FY06juR3DtQoO6e8FuMH5pK/T+vCIKpIFwg7PjyxgguGFQQjGFW93 CGzTabnMIuqR3E6v8KwaMTQP6goWbkP+66Br06qY8QDJvUYoxbuTlPO5R8+//SPcUqTw JXcH0voS5C/lLiXrDiHqdfxtiUGa97F/g3Zi+E35PdVZ7JZYgL53NYkVFnBqGRyErWSO SAnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GciiGnwukZUcZuMgRkuX2+Oq98OfQGEGL0PbIUMdbwY=; b=dFnyN0eMuLZqw/cGiuxhkW4zdN5soVzUnELCUdHqlZjXtCg+I826SEgLaEhED97rDc ZfYqEpyL/JYvWuUTndTZAxTTyeHipU1z2xBrIv3pbQtgmSSftkBrC2VFFFD+c9KRg6L8 DAc0oty4T+ZWxjZrLLYvjkdB3nKAN1rlIabzJPv45YFamVbZ0T7nvkb19VVU2ZnXH5wK rlGMurYnAOoo/7UhL+Iz++JutGfo4daX/5vwh0DSb5j48N3wagt8g6tdMUXPWerngbAC Ml1Do91eakpO4dUdi3Cq2dKMEuRGqnq2PK4j+mE6z/EitOjQXl3LYBHLd7Ps98yLZIqi dvFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DkW8bjkd; 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 aq11si19811730ejc.550.2021.08.09.20.02.41; Mon, 09 Aug 2021 20:03:16 -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=DkW8bjkd; 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 S234744AbhHIVZ5 (ORCPT + 99 others); Mon, 9 Aug 2021 17:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbhHIVZ5 (ORCPT ); Mon, 9 Aug 2021 17:25:57 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05F67C0613D3 for ; Mon, 9 Aug 2021 14:25:36 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id n6so12440646ljp.9 for ; Mon, 09 Aug 2021 14:25:35 -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=GciiGnwukZUcZuMgRkuX2+Oq98OfQGEGL0PbIUMdbwY=; b=DkW8bjkdCbaSSZSwXUD4dP7zGs+heKPA+Oy5FoJ3PhXwaSYav89OxOAcJNbCZqAFmL 0h1nLAi6SdzNhvMaS1Nzft4JS4BHDBbOx4s0vutZIhoGZgzoNkz1aA+MU8kA1xMDmbqc PFME9G1HDX5AzRGqzhBS/Ml77jddOYE1oapDY= 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=GciiGnwukZUcZuMgRkuX2+Oq98OfQGEGL0PbIUMdbwY=; b=IwgqDd8xzcbm/vbc0rqLH4CayFkB6O5mazfhyldJsabmY6mfabUOQ6DSqamnZZ83oI qK+73TGpycuCaOwU+biqkrBZvgDSf+Zzlf+QwaCyTABPAYcfY3JvSfD+geV5wZaDoo0l 9WY/GrMAKJSiPWNOggxW1ZptvCmhxKT18b/+gYkX0KCIgvaPkIa+q4xoihBLpuZuEqn0 4RvdOnH5hzf0cBqL+l+1mkZ8mik7uijXXekS87sw+Lm0n4WBliTI58vlRjC5sErVnKKr zBkNCHKzZsDAQNrSQNkIYTTv7ehNDDfoNUQKYNcEoytBZyIzzjxBEDRCEPSovAi5Ztin NGbg== X-Gm-Message-State: AOAM532+HBTY8GTNDRSW+XH16h8StoHJcYI0zKgczThE4I8a2D6QibYJ Bn+0YOOCEKxSsM23AZ4PxBS5zphuV6yefw+2 X-Received: by 2002:a2e:7f1a:: with SMTP id a26mr16644253ljd.183.1628544334269; Mon, 09 Aug 2021 14:25:34 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id d4sm1842725lfg.178.2021.08.09.14.25.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Aug 2021 14:25:33 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id h2so13494282lji.6 for ; Mon, 09 Aug 2021 14:25:33 -0700 (PDT) X-Received: by 2002:a2e:b703:: with SMTP id j3mr7222089ljo.220.1628544333584; Mon, 09 Aug 2021 14:25:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 9 Aug 2021 14:25:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] overlayfs fixes for 5.14-rc6 To: Miklos Szeredi Cc: Linux Kernel Mailing List , linux-fsdevel , linux-unionfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 9, 2021 at 10:00 AM Miklos Szeredi wrote: > > ovl: fix mmap denywrite Ugh. Th edances with denywrite and mapping_unmap_writable are really really annoying. I've pulled this, but I really get the feeling that there's duplicated code for these things, and that all the "if error goto" cases (some old, some new) are really really uglky. I get the feeling that the whole thing with deny_write_access and mapping_map_writable could possibly be done after-the-fact somehow as part of actually inserting the vma in the vma tree, rather than done as the vma is prepared. And most users of vma_set_file() probably really don't want that whole thing at all (ie the DRM stuff that just switches out a local thing. They also don't check for the new error cases you've added. So I really think this is quite questionable, and those cases should probably have been done entirely inside ovlfs rather than polluting the cases that don't care and don't check. Linus