From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C72EC0650E for ; Mon, 1 Jul 2019 17:47:36 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA729206A3; Mon, 1 Jul 2019 17:47:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="GkWPmo/V"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="d5KA5j9w"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=plexistor-com.20150623.gappssmtp.com header.i=@plexistor-com.20150623.gappssmtp.com header.b="1wUdmopY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA729206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=plexistor.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1hi0Oe-00088q-8O; Mon, 01 Jul 2019 17:47:20 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hi0Ob-00088h-U6 for linux-f2fs-devel@lists.sourceforge.net; Mon, 01 Jul 2019 17:47:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RMtO9zTMwULPwpFiTkeooNGzR9zKo/UB7YgL+t4fgzA=; b=GkWPmo/ViJ1h7xhms9zc2CCtC1 Ee+T/mGzFi6C4DXS/rQhY9phwvIiTN6AMxCzgtROlE15U1a/3I9wpu7f7EdtojC2ftLsz4iJynhFR FIPsexHx6ZOGQOnz1cgFmj7OalzdvEr8Ig7o0QRSONznAkmIpLTBL82KprZZPQFuEMfE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RMtO9zTMwULPwpFiTkeooNGzR9zKo/UB7YgL+t4fgzA=; b=d5KA5j9w6iWtMmqm6R0oH0x0ts bFFL5YC+IxIlyVxJnL4NL2A+QoKJaSdv7fPYNU2x1ml8xVmj3L1jcTluSgAO3faSmUrV+JxIY/LfL dWk8gaX9Qf4djj0lY+3w8PvNP/eeZPn0/g3QJTpzQ0TLG5SK4Oq6pn14NWYevL+UVOog=; Received: from mail-wm1-f66.google.com ([209.85.128.66]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1hi0Op-003gLA-5r for linux-f2fs-devel@lists.sourceforge.net; Mon, 01 Jul 2019 17:47:32 +0000 Received: by mail-wm1-f66.google.com with SMTP id f17so421500wme.2 for ; Mon, 01 Jul 2019 10:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plexistor-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RMtO9zTMwULPwpFiTkeooNGzR9zKo/UB7YgL+t4fgzA=; b=1wUdmopYsOTGEBPctCCQBJNp/Weny3U0OdMAgIX7XMpDLNjX7yi2BQKVOeIOZfgf1b I2dQPvs1YcMd4MKfGasxoR1vUF57n1uWvGfOwCBn+dFFXqdtzk7+nDTMfgxaIC1cMqAd CyXSD5wWJrsSE7f66iNNQpS8suPAgj9SNlBFoRgvaYPLl2O9hulyvjxbO8s6Guhj4y1S Nf6nnLqhsslQUJQ8lQjHCR002MedRLPvKNFje/NywIlwBVxr1dbYLS/Ag6d45MoLEFLA TB43Jl9ECXn6C3ClznsgSlBckfDR8AQM1se/327D0FreZlmY9S9DkHpcHai8gVFUiAbk jAnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RMtO9zTMwULPwpFiTkeooNGzR9zKo/UB7YgL+t4fgzA=; b=GXmdjWyZY8D9MUxknLp7PZjLjfVg+p8mBw1YA68SPn8hfAXDvdQJPaZu79ZHG2kI+Q cYB33V4Ve4+aowXcbMyBiUEN1jC+CykcyG4KXHU2In5PviO+57pCHw6DqFYtY3CjwiEM 2JDR7lZSN8VtCMJ/HKk7ymGlPWSPHwUTjScjDfu8LvDb4pEqg/mKO6MEflfKYIaO19FU 0KsssuB1A734n3nLmfzrTsVrlywDDmq32uD5YFqYqZU8g0MS7KKEZBwQXZ0v+LqDQ1eN hiKAlt+acsZOY6KNbKg7S/BIrFLE7aDzWbJIPQksoKD0G99zF7CC3sD+y5Iu9rqJhAPU e10g== X-Gm-Message-State: APjAAAUHhuuW8QK2hIkf+D7vrgw+i88ZR+IuvxBYdToQU8QfOSOZKARc s6g6LfO1HyBemH0cU4iGBrVYmw0Aqt4= X-Google-Smtp-Source: APXvYqyJIZEjZ99B+K6R50DPm7lq0IHr/E/1lfJMHdrHDPCDWuYMn1JV6lQAB5xdWdZjMaq23hnwbA== X-Received: by 2002:a1c:f009:: with SMTP id a9mr234245wmb.32.1562001657000; Mon, 01 Jul 2019 10:20:57 -0700 (PDT) Received: from [10.68.217.182] ([217.70.211.18]) by smtp.googlemail.com with ESMTPSA id q193sm269299wme.8.2019.07.01.10.20.53 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 10:20:56 -0700 (PDT) To: "Darrick J. Wong" , matthew.garrett@nebula.com, yuchao0@huawei.com, tytso@mit.edu, ard.biesheuvel@linaro.org, josef@toxicpanda.com, hch@infradead.org, clm@fb.com, adilger.kernel@dilger.ca, viro@zeniv.linux.org.uk, jack@suse.com, dsterba@suse.com, jaegeuk@kernel.org, jk@ozlabs.org References: <156174687561.1557469.7505651950825460767.stgit@magnolia> From: Boaz Harrosh Message-ID: <72f01c73-a1eb-efde-58fa-7667221255c7@plexistor.com> Date: Mon, 1 Jul 2019 20:20:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <156174687561.1557469.7505651950825460767.stgit@magnolia> Content-Language: en-MW X-Headers-End: 1hi0Op-003gLA-5r Subject: Re: [f2fs-dev] [PATCH v6 0/4] vfs: make immutable files actually immutable X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-efi@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, reiserfs-devel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-nilfs@vger.kernel.org, linux-mtd@lists.infradead.org, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, devel@lists.orangefs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 28/06/2019 21:34, Darrick J. Wong wrote: > Hi all, > > The chattr(1) manpage has this to say about the immutable bit that > system administrators can set on files: > > "A file with the 'i' attribute cannot be modified: it cannot be deleted > or renamed, no link can be created to this file, most of the file's > metadata can not be modified, and the file can not be opened in write > mode." > > Given the clause about how the file 'cannot be modified', it is > surprising that programs holding writable file descriptors can continue > to write to and truncate files after the immutable flag has been set, > but they cannot call other things such as utimes, fallocate, unlink, > link, setxattr, or reflink. > > Since the immutable flag is only settable by administrators, resolve > this inconsistent behavior in favor of the documented behavior -- once > the flag is set, the file cannot be modified, period. We presume that > administrators must be trusted to know what they're doing, and that > cutting off programs with writable fds will probably break them. > This effort sounds very logical to me and sound. But are we allowed to do it? IE: Is it not breaking ABI. I do agree previous ABI was evil but are we allowed to break it? I would not mind breaking it if %99.99 of the time the immutable bit was actually set manually by a human administrator. But what if there are automated systems that set it relying on the current behaviour? For example I have a very distant and vague recollection of a massive camera capture system, that was DMAing directly to file (splice). And setting the immutable bit right away on start. Then once the capture is done (capture file recycled) the file becomes immutable. Such program is now broken. Who's fault is it? I'm totally not sure and maybe you are right. But have you made a survey of the majority of immutable uses, and are positive that the guys are not broken after this change? For me this is kind of scary. Yes I am known to be a SW coward ;-) Thanks Boaz _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel