Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2032674imu; Sat, 22 Dec 2018 10:33:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/UcLu2hhiF+qK/Hk0iRPpzdFqnctq2qyHGg8ozmb89VLcXYcFppxIFvg5qYLOx3/r+QYm17 X-Received: by 2002:a62:5e41:: with SMTP id s62mr7303283pfb.232.1545503613461; Sat, 22 Dec 2018 10:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545503613; cv=none; d=google.com; s=arc-20160816; b=NmliYp1SFwmUIu86Gz1veMpFatuhVmIFApOwUET+SZPY7Unnlq87GwRN/GRSJGTFy/ KAPLUHYKJX6doebFLnDC4R3Cyu0PMuARUmHwMQhdKB0BtzU71JglFDYw7gasVwFAOaud uXQf2bDTQRCsvn9mom2tzgHsSjNH9Lw5rWassQxrNjYWZpCOEady6wIoBP+nOR7dNlAO CBbe4yo7N/N4KQ7+ZK8t9mFTt8fWZHwP0kAswTzptQpbSOfcAyI2eCRqB8yv7vFWpCqr eOwn3fbTgns11GslDxQzW1fI2MISNHkHFpp3kFl8JDjQZ1ILbxhMkgZGib1qQ9kKbvBO lULg== 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:to :from:date:dkim-signature; bh=krbbnlb6aVpMQ0gn3zlurEu/lpfGp4O1sxU7b/D6AB4=; b=Lo8sQKSu+Z+CXQCkEAmbEAElhtMQZ8TiyP0CHo/GIvkQmf47Ekj5wRmUczTSK+O8JH VwcQRX2+Ux9Oo1YGpBo0/RPZ5IQj61HoDEE7t9dZpMncc8W/wErazY9s1aoqDHkmOmAD F0nVyw0Dl/RiIm5b92ThDkDT6fjxaoZferBP/GP3G6yNDzIqTGfEE9cGPyaVFqprvC+b H7S6GBcg06XR2DaYFDIy0WtH7Y7p49kckV8DTpyC/06UlUqY+taLiEMZo5alce27SfJc EgYpVjpQAft61xU0AN5vi3HJulJmdNUiF9YQnFbnu0Q+6u4G4msLs0U1tuC9gK+nqm3g O09w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=LjhvsJkD; 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 193si21569326pgc.220.2018.12.22.10.33.18; Sat, 22 Dec 2018 10:33:33 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=LjhvsJkD; 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 S1732393AbeLUQem (ORCPT + 99 others); Fri, 21 Dec 2018 11:34:42 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35196 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbeLUQem (ORCPT ); Fri, 21 Dec 2018 11:34:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding: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=krbbnlb6aVpMQ0gn3zlurEu/lpfGp4O1sxU7b/D6AB4=; b=LjhvsJkDRbPj2LmvmPvTqWyu8 8oHP2oq7tBxsqV5tzX4rGbYu60eiuULOO6D04V9rfgGOFf5ls9wYGkXmAnfZ8xsSu/gfv5+fqoxGN Cn1HrI7CKvcYj9eZ+NxFBkGB7wUYXB2lNpWTIEIMj4PSyScBd1dEJtqt73xNM8Jnim8Rn+sGKA0uB H2DH+jycEt32k98weJclKFJLvsCeZklAO27XvQo0xW/V5hQoDzDoVdCKfaYzvgTqiAcDKJ0aClNJD D4vq8m+YhLpLHYYkWPEKpKcDfjOZqZ5aPt4nOPoEBk9UyZlApTz7zG4N4WzwzsTANcXs9coDc12Ea guKcQBJEQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaNl0-0002tb-U0; Fri, 21 Dec 2018 16:34:38 +0000 Date: Fri, 21 Dec 2018 08:34:38 -0800 From: Matthew Wilcox To: "Theodore Y. Ts'o" , Christoph Hellwig , Dave Chinner , "Darrick J. Wong" , Eric Biggers , linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Jaegeuk Kim , Victor Hsieh , Chandan Rajendra , Linus Torvalds Subject: Re: [PATCH v2 01/12] fs-verity: add a documentation file Message-ID: <20181221163438.GE10600@bombadil.infradead.org> References: <20181219071420.GC2628@infradead.org> <20181219021953.GD31274@dastard> <20181219193005.GB6889@mit.edu> <20181219213552.GO6311@dastard> <20181220220158.GC2360@mit.edu> <20181221070447.GA21687@infradead.org> <20181221154714.GA26547@mit.edu> <20181221155354.GC10600@bombadil.infradead.org> <20181221162813.GB26547@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181221162813.GB26547@mit.edu> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 21, 2018 at 11:28:13AM -0500, Theodore Y. Ts'o wrote: > On Fri, Dec 21, 2018 at 07:53:54AM -0800, Matthew Wilcox wrote: > > In contrast to "we'll just fix it up later" (which usually applies > > to in-kernel interfaces), we have a policy of not breaking userspace, > > so accepting this interface means setting it in stone. We should get > > it right. > > I'm not convinced it's a "fix", but my point is that if later on you > want to add extra complexity transforming > > ioctl(fd, FS_IOC_ENABLE_VERITY); > > so it does the equivalent of > > ioctl(fd, FS_IOC_ENABLE_VERITY_NOW_WITH_EXTRA_USELESS_COMPLEXITY, > fd, sizeof_data, sizeof_verity_data); I disagree with your EXTRA_USELESS_COMPLEXITY appendage. The interface you designed reflects the implementation you did in ext4, so I understand why it seems simple from your point of view. From the user point of view, it looks completely weird. You write a file, being a series of bytes, then all of a sudden have to know that it's composed of blocks, seek to the next block, write a header, then this Merkle data structure, then write a footer which isn't allowed to cross a block boundary for some unknowable reason. It seems much more logical to have the header+Merkle+footer as a separate data stream which the filesystem can then layout according to its own rules.