Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3629113ybi; Mon, 10 Jun 2019 13:43:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyctX/LuGdNEKjqgxJHOMXIfxCKsb6QDW0a9IFkhp2kVGJdv8acs4hWMHnIbp9FqO73uyiu X-Received: by 2002:aa7:9095:: with SMTP id i21mr71149809pfa.119.1560199397593; Mon, 10 Jun 2019 13:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560199397; cv=none; d=google.com; s=arc-20160816; b=TRBGde4siAJEs6T8jaDwHAPBjR0XcgH7OG0nGGWL1GuICLtbyRKcR+xk+Ll3hJm2xX jns0K7JrNzXldE7701XywXVtzIuS7YBRVkLGenZJ2fFTCmuE2CMsYJaB+r83QIyL2n11 wrQyd29WbuBD8IeFVpuzE9CssJLWhfdSIu/kZqxasIZCE7a1CSKCCCoKlWR7SZzS0uiU eHOCkpAeddbS6sCSsHjyWTcWQfLudnOBwO9Mv2vaTdggEupbjHlqdrM9+RYQ75MjebWi 393hOJ237w3IkJYRlRd5iUSAZFXJEd0P049nWM0F3tEUiwW2QHF7ZduQVUAfPjS2JfCB dTZw== 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; bh=ZGkqaqJfwPd+fjM7twQRXkHZqhGbKhROgc44/T3iciA=; b=aHZTjuJIJEp+TV//+2gFSij2SOz0tHWwHB4mh+rI3nrgjBm8ZZXtWv+DSPr63EqsFo O2kT0Hs0t2xKXoXu1IvfvPxaQZLaQ/VmxPQz7v+BmjWYbtUmPjTyESUJwd1Q1Ww/bsum GZfvBsMNVBqSPHirp76PDJNgtY3lWlMSmtARZEsD3P3bpgXVUEIT/3BhTZrYJ+nymJF2 q4v65XBd6Gb7ThDTjjF0E2LCeyoeKVA7qpzn4BTZR+KaqdNdBei/1/i23b4ZBsm2Hze3 dVFyIOILzS5OJyx8m+AbqvPrE6T+bsSzu4xgUp1rAMfry8e08FUW0VPqczbr5dOxyplY hlqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 n7si9889954plk.435.2019.06.10.13.42.57; Mon, 10 Jun 2019 13:43:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389342AbfFJUmC (ORCPT + 99 others); Mon, 10 Jun 2019 16:42:02 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:60681 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389538AbfFJUmC (ORCPT ); Mon, 10 Jun 2019 16:42:02 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-109.corp.google.com [104.133.0.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x5AKfsg3006278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2019 16:41:55 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 1ADDB420481; Mon, 10 Jun 2019 16:41:54 -0400 (EDT) Date: Mon, 10 Jun 2019 16:41:54 -0400 From: "Theodore Ts'o" To: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/8] mm/fs: don't allow writes to immutable files Message-ID: <20190610204154.GA5466@mit.edu> References: <155552786671.20411.6442426840435740050.stgit@magnolia> <155552787330.20411.11893581890744963309.stgit@magnolia> <20190610015145.GB3266@mit.edu> <20190610044144.GA1872750@magnolia> <20190610131417.GD15963@mit.edu> <20190610160934.GH1871505@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190610160934.GH1871505@magnolia> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jun 10, 2019 at 09:09:34AM -0700, Darrick J. Wong wrote: > > I was planning on only taking 8/8 through the ext4 tree. I also added > > a patch which filtered writes, truncates, and page_mkwrites (but not > > mmap) for immutable files at the ext4 level. > > *Oh*. I saw your reply attached to the 1/8 patch and thought that was > the one you were taking. I was sort of surprised, tbh. :) Sorry, my bad. I mis-replied to the wrong e-mail message :-) > > I *could* take this patch through the mm/fs tree, but I wasn't sure > > what your plans were for the rest of the patch series, and it seemed > > like it hadn't gotten much review/attention from other fs or mm folks > > (well, I guess Brian Foster weighed in). > > > What do you think? > > Not sure. The comments attached to the LWN story were sort of nasty, > and now that a couple of people said "Oh, well, Debian documented the > inconsistent behavior so just let it be" I haven't felt like > resurrecting the series for 5.3. Ah, I had missed the LWN article. Yeah, it's the same set of issues that we had discussed when this first came up. We can go round and round on this one; It's true that root can now cause random programs which have a file mmap'ed for writing to seg fault, but root has a million ways of killing and otherwise harming running application programs, and it's unlikely files get marked for immutable all that often. We just have to pick one way of doing things, and let it be same across all the file systems. My understanding was that XFS had chosen to make the inode immutable as soon as the flag is set (as opposed to forbidding new fd's to be opened which were writeable), and I was OK moving ext4 to that common interpretation of the immmutable bit, even though it would be a change to ext4. And then when I saw that Amir had included a patch that would cause test failures unless that patch series was applied, it seemed that we had all thought that the change was a done deal. Perhaps we should have had a more explicit discussion when the test was sent for review, but I had assumed it was exclusively a copy_file_range set of tests, so I didn't realize it was going to cause ext4 failures. - Ted