Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3403557ybi; Mon, 10 Jun 2019 09:39:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvRJFYebVBO3stgM82IOeQuyDDCIkMgKnAKE9+qJdpRCf6KmQBuoOdgVkLvHtmbEIxUHdh X-Received: by 2002:a17:902:e409:: with SMTP id ci9mr71511749plb.103.1560184791053; Mon, 10 Jun 2019 09:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560184791; cv=none; d=google.com; s=arc-20160816; b=sIilut+YRZfx39HvjAjpWmVLMWzZjTfsstuJJPTt7Oc1Srk16G4riTv0kBEHelCwz8 G4BpIb5IfK7pZ9GGn9jXfqIqNzu5yiTB88DuB2VoQusNNNJTLV5FySWHcV519/IVlZCk OSbs6IobvzsBdPH3JQI4VFqRKfalxrX19ctHtrgJ8bWW+wVEQyBfaf2cc1kOM/BXLthd km9qRSiYHT3SQTJwqekPU/txcY7eGpIXDNr3ysCCS1vn4FhD6WXTpVMJFJjAdOftqla5 YOdZRavSTILZZr256aGT6wfeYdLrdpu5T2I+Lvie+B/IyNLM4aWKn46kIdtaYFXQS1L5 t76w== 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:dkim-signature; bh=q/XqjsUkDq6xevue9zs57YIabmhhkQKl2VGDHiV5jq4=; b=d+TaQ1wG4sDW8wN1QH9oJer2nCABPyhzmmm2yO1I3BIkP7Ng7aHW4AMDTZHgwRXA0F kjWJTLgdr5Gjh8WqmYzNzj/uRrp+rMGRH+vIkM4xgxq96i7MZHPUmpsf+DccEC5UXbNu C5iaPr0cHNOMQuetRbknwuugtp0sDMuZpcjS8ffEqziRdmVLHnlM8GrnKCBY+YfsASHh 7h++5WF4BnioDhj2tl9uURzmBJAFq1037e8RBNGMsT0UWsdxN2Y1wfTWcB9eoFc1+fIg q/y8a3FEEJUpMiA9112EDWegTK5rq1kwmuorU9DunyLOQNnDnnCuOGeSQc0Jg/GzSTRv zoxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=z113WwHc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si790129plr.5.2019.06.10.09.39.32; Mon, 10 Jun 2019 09:39:51 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=z113WwHc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389876AbfFJQJo (ORCPT + 99 others); Mon, 10 Jun 2019 12:09:44 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:36720 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389392AbfFJQJo (ORCPT ); Mon, 10 Jun 2019 12:09:44 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5AG8dYb186787; Mon, 10 Jun 2019 16:09:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=q/XqjsUkDq6xevue9zs57YIabmhhkQKl2VGDHiV5jq4=; b=z113WwHcxX3n/yhODGaHV37Y8Y2xpZmcyhxxxXzJA/k/rxOYXjF2MjD/1uhcbfhftRYf 5pqMjh5K3CtHPhzszPk3sJvtarblaJBFXn+SMzznHbGaB/24N8rQCO6FIzIJiYWF5Jmy 0Ctn3AGwZpPxskUF74cndxv7urz5f3+PcDqCnsdci1pwvBGZZ6ksWHEShe2xXI4W3GG/ zsFwGRTeohmYJJragnO65tWk+/TgIVgAHp17i7Qzmiy9ZuC84qzcwRNBXZbhGeO1dq1K Yw1OMGx7ZEqHS/69RztKNiTCeLKDWlHFChndJrLK17c0MsRVkQQFuAzKKwCH+BVYyVom Lg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2t04etfvt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Jun 2019 16:09:37 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5AG9TMe154450; Mon, 10 Jun 2019 16:09:37 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2t024twpwf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Jun 2019 16:09:37 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x5AG9aDJ022183; Mon, 10 Jun 2019 16:09:36 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Jun 2019 09:09:36 -0700 Date: Mon, 10 Jun 2019 09:09:34 -0700 From: "Darrick J. Wong" To: "Theodore Ts'o" 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: <20190610160934.GH1871505@magnolia> References: <155552786671.20411.6442426840435740050.stgit@magnolia> <155552787330.20411.11893581890744963309.stgit@magnolia> <20190610015145.GB3266@mit.edu> <20190610044144.GA1872750@magnolia> <20190610131417.GD15963@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190610131417.GD15963@mit.edu> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9284 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906100110 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9284 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906100110 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:14:17AM -0400, Theodore Ts'o wrote: > On Sun, Jun 09, 2019 at 09:41:44PM -0700, Darrick J. Wong wrote: > > On Sun, Jun 09, 2019 at 09:51:45PM -0400, Theodore Ts'o wrote: > > > On Wed, Apr 17, 2019 at 12:04:33PM -0700, Darrick J. Wong wrote: > > > > > Shouldn't this check be moved before the modification of vmf->flags? > > > It looks like do_page_mkwrite() isn't supposed to be returning with > > > vmf->flags modified, lest "the caller gets surprised". > > > > Yeah, I think that was a merge error during a rebase... :( > > > > Er ... if you're still planning to take this patch through your tree, > > can you move it to above the "vmf->flags = FAULT_FLAG_WRITE..." ? > > 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. :) > 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. I do want to clean up the parameter validation for the VFS SETFLAGS and FSSETXATTR ioctls though... eh, maybe I'll just send out the series as it stands now. I'm still maintaining it, so all that work might as well go somewhere. --D > > - Ted > > >