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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 5A39FFA372C for ; Fri, 8 Nov 2019 19:36:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E8F5206C3 for ; Fri, 8 Nov 2019 19:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573241761; bh=98CTD1etW9H20E3cCNEDvFQ8V8zeVFrjcPnYMXN0TNs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=i9WOTtb+0B79GhuYHToHt0GF9MHBkNhWo4SYQZuWWdrpFYX3809skDKsPk0a5TuEe V9vdHATnI9lZom5uDVywemG3lXR6QBZiqa/NT90QezYaywRCQsa3cl0AjLUl14zBrs mrSQtTX+mR1cDViBi7NQclwF3Wl4+dCpBW7kbJ34= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732007AbfKHTgA (ORCPT ); Fri, 8 Nov 2019 14:36:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:57468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727233AbfKHTgA (ORCPT ); Fri, 8 Nov 2019 14:36:00 -0500 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87FDD206A3; Fri, 8 Nov 2019 19:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573241759; bh=98CTD1etW9H20E3cCNEDvFQ8V8zeVFrjcPnYMXN0TNs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YL8EudJ2mTqL3pUp/TSoID2WBaJpPHg+ADaqLXn1jqLGmHvlaLYR3UnW2P6DQsqDy hV8LrIuDKB+LHVoJFh1iFtkiQLVDIi+oDuT9s4TmmuxU74xjAfDqCvjqIb+aPmQQuO imgrJJhWQe+dSiyRjbRkA+rBs9WhRvt9xvMGvGas= Date: Fri, 8 Nov 2019 11:35:58 -0800 From: Eric Biggers To: walter harms Cc: linux-man@vger.kernel.org, darrick.wong@oracle.com, dhowells@redhat.com, jaegeuk@kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, victorhsieh@google.com Subject: Re: [man-pages RFC PATCH] statx.2: document STATX_ATTR_VERITY Message-ID: <20191108193557.GA12997@gmail.com> Mail-Followup-To: walter harms , linux-man@vger.kernel.org, darrick.wong@oracle.com, dhowells@redhat.com, jaegeuk@kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, victorhsieh@google.com References: <20191107014420.GD15212@magnolia> <20191107220248.32025-1-ebiggers@kernel.org> <5DC525E8.4060705@bfs.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5DC525E8.4060705@bfs.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-man-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On Fri, Nov 08, 2019 at 09:23:04AM +0100, walter harms wrote: > > > Am 07.11.2019 23:02, schrieb Eric Biggers: > > From: Eric Biggers > > > > Document the verity attribute for statx(). > > > > Signed-off-by: Eric Biggers > > --- > > man2/statx.2 | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > RFC since the kernel patches are currently under review. > > The kernel patches can be found here: > > https://lkml.kernel.org/linux-fscrypt/20191029204141.145309-1-ebiggers@kernel.org/T/#u > > > > diff --git a/man2/statx.2 b/man2/statx.2 > > index d2f1b07b8..713bd1260 100644 > > --- a/man2/statx.2 > > +++ b/man2/statx.2 > > @@ -461,6 +461,10 @@ See > > .TP > > .B STATX_ATTR_ENCRYPTED > > A key is required for the file to be encrypted by the filesystem. > > +.TP > > +.B STATX_ATTR_VERITY > > +The file has fs-verity enabled. It cannot be written to, and all reads from it > > +will be verified against a Merkle tree. > > Using "Merkle tree" opens a can of worm and what will happen when the methode will change ? > Does it matter at all ? i would suggest "filesystem" here. > Fundamentally, fs-verity guarantees that all data read is verified against a cryptographic hash that covers the entire file. I think it will be helpful to convey that here, e.g. to avoid confusion with non-cryptographic, individual block checksums supported by filesystems like btrfs and zfs. Now, the only sane way to implement this model is with a Merkle tree, and this is part of the fs-verity UAPI (via the file hash), so that's where I'm coming from here. Perhaps the phrase "Merkle tree" could be interpreted too strictly, though, so it would be better to emphasize the more abstract model. How about the following?: The file has fs-verity enabled. It cannot be written to, and all reads from it will be verified against a cryptographic hash that covers the entire file, e.g. via a Merkle tree. - Eric