Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3714357imm; Sat, 25 Aug 2018 00:58:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbDwT+KZwB6BoCLgNEOGgHmUS80mhTT4zYpY20XTeC9Tf8+n+fg5N6CPDc80jA3YCAxMxVM X-Received: by 2002:a63:7343:: with SMTP id d3-v6mr4806938pgn.281.1535183892809; Sat, 25 Aug 2018 00:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535183892; cv=none; d=google.com; s=arc-20160816; b=Qk6Su0Jz+/qXGLyR6NVWTJTJU+P7KQzGi1VPad3yqROS1t82FBiP1DHAm71A0i0EeK SJS4Kxnv7yrkHGoTjlwtgfe6EZOkXonUNRBR7UEE0oT4nT3Yz+oOE5Jg8Vhx2RGh/u62 qnBYug2gjRbr7JyuS5uP05fG89NQpPQf5tx8QMcFUSoPVjJds63OTPtcBOm5VkvaHQO9 HQNnWaAaZF12Rf/vw/I76xT4uNCwLqWl5w5x0P6VjCgKyPN5RA+czcgIG9XQq/34WopK 7ZNqLmUs0pNsI95XMOICbj9iFqMAObyD7osiYYOYNwR5y68VfYfOKNIz7JZQpqJhjWuM m+4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:references:to:from:subject :arc-authentication-results; bh=5rP0yNkGN8CYU1kkX+9Fa5+RFPHuEGTXdOY8VU2fZy4=; b=Jw/33zj75pnrNloyNhSBO3rH5w8t93teElOltvSB2GzF3tysaoTzjJ5+lojby+ptk2 aF31Jo74FZFGjEBMtiWFOItZv4hc/dqP7svpm0rFkwQEKnKWWYVPxgxtzoR82bt1a3t4 CGNK9osPAwFWDFCCCo5sQHox2jO/sz7jl54fix4+NRgZHuOk2rMsJyn4UIi1VVHt/Lh5 pGsZg2xywGplJwgFI0XDRrgul+xhy5AXv+68BC09V+ZQBkT5JPodcvWPuoL/t3BfKP0p PCgRXGXiRIlbegT+WRI/u1bmCJDKu6v2NoBj+zv+zaVrR6h7yAQcLhm1+06ccnfpVv7O LOcQ== ARC-Authentication-Results: i=1; mx.google.com; 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 p15-v6si8921770pgh.281.2018.08.25.00.57.57; Sat, 25 Aug 2018 00:58:12 -0700 (PDT) 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; 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 S1726969AbeHYLee (ORCPT + 99 others); Sat, 25 Aug 2018 07:34:34 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11198 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726526AbeHYLee (ORCPT ); Sat, 25 Aug 2018 07:34:34 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7013BBA7FC02; Sat, 25 Aug 2018 15:56:22 +0800 (CST) Received: from [10.151.23.176] (10.151.23.176) by smtp.huawei.com (10.3.19.205) with Microsoft SMTP Server (TLS) id 14.3.399.0; Sat, 25 Aug 2018 15:56:19 +0800 Subject: Re: [f2fs-dev] [RFC PATCH 02/10] fs-verity: add data verification hooks for ->readpages() From: Gao Xiang To: "Theodore Y. Ts'o" , Eric Biggers , , , , Dmitry Kasatkin , Michael Halcrow , , , , Mimi Zohar , Victor Hsieh References: <20180824161642.1144-1-ebiggers@kernel.org> <20180824161642.1144-3-ebiggers@kernel.org> <2f2382c3-e5e9-f0da-dc89-42dfc7b2b636@huawei.com> <20180825034544.GA5281@thunk.org> <20180825050621.GA25031@thunk.org> Message-ID: <22b235b0-8615-5947-bcae-78f4d492d28a@huawei.com> Date: Sat, 25 Aug 2018 15:55:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.151.23.176] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ted, Please ignore the following email, Eric has replied to me. :) I need to dig into these fs-verity patches later and best wishes to fs-verity. Thanks, Gao Xiang On 2018/8/25 15:33, Gao Xiang wrote: > Hi Ted, > > Thanks for your detailed reply. Sorry about my english, the words could not be logical. > > Tiny pieces in B-tree to compose a page is too far from us too, and you are right, > fs-verity is complete for >99% cases for the existed file system, and no need to worry about currently. > > As I mentioned in reply to Eric, I am actually curious about the Google fs-verity roadmap > for the future Android, I need to analyze if it is only limited to APKs for the read-write partitions > and not to replace dm-verity in the near future since fs-verity has some conflicts > to EROFS I am working on I mentioned in the email to Eric. > > I think it is more than just to handle FILE_MAPPING and bio-strict for compression use. > > On 2018/8/25 13:06, Theodore Y. Ts'o wrote: >> But I'd suggest worrying about it when such a file system >> comes out of the woodwork, and someone is willing to do the work to >> integrate fserity in that file system. >> > Yes, we are now handling partial page due to compression use. > > fs could submit bios in pages from different mapping(FILE_MAPPING[compress in-place and no caching > compressed page to reduce extra memory overhead] or META_MAPPING [for caching compressed page]) and > they could be decompressed into many full pages and (possible) a partial page (in-place or out-of-place). > > so in principle, since we have BIO_MAX_PAGES limitation, a filemap page could be Uptodate > after two bios is ended and decompressed. and other runtime limitations could also divide a bio into two bios for encoded cases. > > Therefore, I think in that case we could not just consider FILE_MAPPING and one bio, and as you said `In > that case, it could call fsverity after assembling the page in the page cache.' should be done in this way. > >> Well, the userspace interface for instantiating a fs-verity file is >> that it writes the file data with the fs-verity metadata (which >> consists of the Merkle tree with a fs-verity header at the end of the >> file). The program (which might be a package manager such as dpkg or >> rpm) would then call an ioctl which would cause the file system to >> read the fs-verity header and make only the file data visible, and the >> file system would the verify the data as it is read into the page >> cache. > Thanks for your reply again, I think fs-verity is good enough for now. > However, I need to think over about fs-verity itself more... :( > > Thanks, > Gao Xiang