Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2689964imm; Sat, 9 Jun 2018 23:00:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKs0jPmwO2K2myYgfPWtbUBuMQ9dBPOsR0Ifz0dcGW3hIEs0gvoi6Tx688zH7YYEmFvX4Cs X-Received: by 2002:a63:8f0d:: with SMTP id n13-v6mr10922735pgd.109.1528610403252; Sat, 09 Jun 2018 23:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528610403; cv=none; d=google.com; s=arc-20160816; b=twwOAnHDGgWmFOVMgTOrbCC8T7W9a+asUxNNL2EcUfibzSaRGl3dJcZGi43TXBQR28 lSAcb3TycT0N1YVRUW+07OKjd+Fpcv4rcMmrv8OiAZtvSUpogCJoiVZeCVMouqZyjERy jUb5XwIqV//EB+6mI1UGtJNKw2GXJ3FnzieWaHQ9AAp8sJFfUOuKGAb72kP8QwC264y4 VljD2ndR9J+tmTNdfhU5YenPaIw+VLoLOH8n0huhlsNGrGYu+EP61qWPX0euk1RsuSfp 8YA8MWhYLzbT2g3VyZH/wlGwzBokz3/wFUfSd/rq8h4w3zolfd15VOm2neGP2ST0e7Wm jZlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Kgs1dviI74AGbq9M+WPwuoXZChW8FgpFYF/jnXFlz8I=; b=DG6mrjsac5zxxWEVqD3ExgyR/i1djv/Rmf3Xp5Wi9z/TKBA71ptBbTvnYM2ayJS0Z/ qev8TaHyNPecUaxSkwdC8q8ggw/QTvb0Ts7uyugp+gNVBdupxOxt7nNvGEEHFkb2dvta zDXvX62tAEZeTMufkWxkbJsltijE7nj/ULrhM+9zgBCrgudeb3NTH3A4fGmTkZ/9bGKq sAWc0MCzInf6uem3Y1NQPcXKpR/v/moA8RvbH+X2r/cuyhysJCVjPi8524gmdr/zYryH mAvyd4uSl4up/e/btAH/N8ZC6s3tdRwh1aMcljeVV1ibIjyfQvL1gFS/fhGcoDOvqL3Z n4jA== ARC-Authentication-Results: i=1; mx.google.com; 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 b2-v6si49329954pgc.569.2018.06.09.22.59.48; Sat, 09 Jun 2018 23:00:03 -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; 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 S932195AbeFJFzs (ORCPT + 99 others); Sun, 10 Jun 2018 01:55:48 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54516 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932085AbeFJFzq (ORCPT ); Sun, 10 Jun 2018 01:55:46 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fRtJG-0004G4-J5; Sun, 10 Jun 2018 05:54:44 +0000 Date: Sun, 10 Jun 2018 06:54:38 +0100 From: Al Viro To: Christoph Hellwig Cc: Miklos Szeredi , Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: Re: [GIT PULL] overlayfs update for 4.18 Message-ID: <20180610055326.GR30522@ZenIV.linux.org.uk> References: <20180608121330.GG23785@veci.piliscsaba.redhat.com> <20180609065208.GA31572@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180609065208.GA31572@infradead.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 08, 2018 at 11:52:08PM -0700, Christoph Hellwig wrote: > On Fri, Jun 08, 2018 at 02:13:30PM +0200, Miklos Szeredi wrote: > > Hi Linus, > > > > Please pull from: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git tags/ovl-update-4.18 > > > > This contains two new features: > > > > 1) Stack file operations: this allows removal of several hacks from the > > VFS, proper interaction of read-only open files with copy-up, > > possibility to implement fs modifying ioctls properly, and others. > > Which includews all kinds of NAKed or at least non-acked VFS changes. Umm... The worst of yours had been ->pre_mmap(), right? He *did* drop that... > Please get these through Als tree after proper review first. OK, summary of sort (see fsdevel thread for details): * path_open() is dubious; why not simply use vfsmount/dentry from the right layer when opening an underlying file? Then it would be vfs_open()... * ovl_mmap() is broken, plain and simple. Failure ends up leaking a layer struct file *and* doing double fput() on overlayfs one. * ovl_mmap() is also trivially DoSable - you can trigger tons and tons of reopens, each sticking a new (writable layer) struct file into a vma. We *do* want some scheme avoiding once-per-operations reopens in the copied-up-after-r/o-open case. See possible kinda-sorta solution on fsdevel; I'm not sure I like it, though. The rest is pretty minor.