Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Theodore Y. Ts'o
On Fri, Dec 21, 2018 at 11:13:07AM -0800, Linus Torvalds wrote: > > I do agree that your particular model is pretty damn broken in lots of ways. > > Why is it filesystem specific? If the whole point is that the file > itself has its own verification data (which I like), then I don't see > why

Re: [f2fs-dev] [PATCH 1/1] f2fs: fix validation of the block count in sanity_check_raw_super

2018-12-21 Thread Chao Yu
On 2018/12/22 3:28, Martin Blumenstingl wrote: > Treat "block_count" from struct f2fs_super_block as 64-bit little endian > value in sanity_check_raw_super() because struct f2fs_super_block > declares "block_count" as "__le64". > > This fixes a bug where the superblock validation fails on big

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Linus Torvalds
On Fri, Dec 21, 2018 at 7:47 AM Theodore Y. Ts'o wrote: > > Linus --- we're going round and round, and I don't think this is > really a technical dispute at this point, but rather an aesthetics > one. Grr. So honestly, I personally *like* the model of "the file contains its own validation data"

[f2fs-dev] [PATCH 0/1] f2fs: fix sanity_check_raw_super on big endian machines

2018-12-21 Thread Martin Blumenstingl via Linux-f2fs-devel
Big endian machines (at least the one I have access to) cannot mount f2fs filesystems anymore. This is with Linux 4.14.89 but I suspect that 4.9.144 (and later) is affected as well. commit 0cfe75c5b01199 ("f2fs: enhance sanity_check_raw_super() to avoid potential overflows") treats the

[f2fs-dev] [PATCH 1/1] f2fs: fix validation of the block count in sanity_check_raw_super

2018-12-21 Thread Martin Blumenstingl via Linux-f2fs-devel
Treat "block_count" from struct f2fs_super_block as 64-bit little endian value in sanity_check_raw_super() because struct f2fs_super_block declares "block_count" as "__le64". This fixes a bug where the superblock validation fails on big endian devices with the following error: F2FS-fs (sda1):

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Matthew Wilcox
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

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Theodore Y. Ts'o
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

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Matthew Wilcox
On Thu, Nov 01, 2018 at 03:52:19PM -0700, Eric Biggers wrote: > +In the recommended configuration of SHA-256 and 4K blocks, 128 hash > +values fit in each block. Thus, each level of the hash tree is 128 > +times smaller than the previous, and for large files the Merkle tree's > +size converges to

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Matthew Wilcox
On Fri, Dec 21, 2018 at 10:47:14AM -0500, Theodore Y. Ts'o wrote: > Linus --- we're going round and round, and I don't think this is > really a technical dispute at this point, but rather an aesthetics > one. Will you be willing to accept my pull request for a feature > which is being shippped on

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Theodore Y. Ts'o
On Thu, Dec 20, 2018 at 11:04:47PM -0800, Christoph Hellwig wrote: > Ted, I think you know yourself this isn't true. Whenever we added > useful interface to one of the major file systems we had other pick > it up, and that is a good thing because the last thing we need is > fragmentation of

Re: [f2fs-dev] [PATCH v2 01/12] fs-verity: add a documentation file

2018-12-21 Thread Richard Weinberger
On Fri, Dec 21, 2018 at 9:58 AM Christoph Hellwig wrote: > > On Thu, Dec 20, 2018 at 05:01:58PM -0500, Theodore Y. Ts'o wrote: > > That's simply not true. Number one, fsverity is not mandatory for all > > file systems to implement. If XFS doesn't want to implement fscrypt > > or fsverity, it