Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp874034rwl; Wed, 5 Apr 2023 08:48:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YGJF7j9rXGaAgA+z6eJgJJtK46/e1O0IAnCHHFyV0SBHGcmlJqMjnnFUFrf8oI+KkS7+71 X-Received: by 2002:a05:6a20:9386:b0:da:f5f5:7d13 with SMTP id x6-20020a056a20938600b000daf5f57d13mr2962330pzh.24.1680709702358; Wed, 05 Apr 2023 08:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680709702; cv=none; d=google.com; s=arc-20160816; b=WwcGJHc5N2MQ4MWwwZ7XCTcb47Cynw1sBn0xZGU0ynR0PXrMzsRM8hQcvXERZFVutk CVwScMb+RYiVY9zTIn2RDsQSYGcw0IF8OX7WBOxOWmZoG4WM3ZrR5tG5YKUo+APS5D7C vGujTAaGvddwfXbpu+vFkgdd26Z5rxYohnAXvlPeVaVEVHxH2DPRawk0zariD1/5C+Rp R6oNMnXBCTM0guQnLk12Wpacb8PqYdZmrDXiDYEjPU+PK3KHuJU4e+EO2Ovmhg7kcCIn Vq8toxazOxrh9CKZyDj/ZsUjTiW7KISNOtM85ZuwBVryJnrcFgUwGg9N2fkaVpEAH/Y1 /ciw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/a4RYFvjJCESxZnfN0nD29LBSxPBoE93Z5aSyhucaTc=; b=yvWy9nztJWCxI0MiU/MLFVlhSi9gzwzOa0KB8z6JOJoSz6fe3bqr2RKfagPe5cHvKU +EJACVOK6jHmjTt9d+oaUHq57ZdouIgzgQHr6u3rEjxwC3Sm9URLQdi3sp8bu45eLh3X CjnhoIxOmlVW/zVP11KoaSneJ+eDZS4/JFIE6epZEwgirwPYBuy3HUC7BVoP3owlsBxo 4mNoZEEKOk9k7o7x15PBJf768ccJ9xL+cs9gM9g4R+tcZ5rE9pphvveQ/QNp4hwWN+OL dIpiNivdxfO6EVpQ70+69DxGZs8zUatG6aBkphHQ673H12a5TO8GH+ttHgH2rXqu18YY oAVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=uZ5h4Xuo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t64-20020a638143000000b0050bcbcaf7edsi1787099pgd.820.2023.04.05.08.47.49; Wed, 05 Apr 2023 08:48:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=uZ5h4Xuo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239002AbjDEPrZ (ORCPT + 99 others); Wed, 5 Apr 2023 11:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239024AbjDEPrX (ORCPT ); Wed, 5 Apr 2023 11:47:23 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E7D75FC3; Wed, 5 Apr 2023 08:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/a4RYFvjJCESxZnfN0nD29LBSxPBoE93Z5aSyhucaTc=; b=uZ5h4XuoSXe9+bgTWZvctsPSxL J8n1Ti8TOouo/7zVirWNYVC1UyJOxKJpvj0IV+068Sq2z4depUOryc2RPjsLDhDshySk3s1ERkMpO twG0PSY4Y9A4gHSqC5CiZ3DMrNnYamMfG6SDrpa5Hbgson6ObhdtRptTunuu6/oiaeD91NhGeqxl2 LLiW0vhAwI9MzSnUyZBwOw1mxO39uzvhLDuMN7ocWBeWMY6tdeepv0CTpk6k8mMGLRIx/k4z9ngyj nvah9ZylV5D24DoACN/gpECeBwawUgtXs3FnYtThZl3pWf+dDadXNQQ65Tb5WLmAhQS1NHqb3/aKN ufVxLm9g==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pk5LR-004xwQ-0b; Wed, 05 Apr 2023 15:46:45 +0000 Date: Wed, 5 Apr 2023 08:46:45 -0700 From: Christoph Hellwig To: Andrey Albershteyn Cc: Christoph Hellwig , djwong@kernel.org, dchinner@redhat.com, ebiggers@kernel.org, linux-xfs@vger.kernel.org, fsverity@lists.linux.dev, rpeterso@redhat.com, agruenba@redhat.com, xiang@kernel.org, chao@kernel.org, damien.lemoal@opensource.wdc.com, jth@kernel.org, linux-erofs@lists.ozlabs.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com Subject: Re: [PATCH v2 05/23] fsverity: make fsverity_verify_folio() accept folio's offset and size Message-ID: References: <20230404145319.2057051-1-aalbersh@redhat.com> <20230404145319.2057051-6-aalbersh@redhat.com> <20230405103642.ykmgjgb7yi7htphf@aalbersh.remote.csb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230405103642.ykmgjgb7yi7htphf@aalbersh.remote.csb> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Apr 05, 2023 at 12:36:42PM +0200, Andrey Albershteyn wrote: > Hi Christoph, > > On Tue, Apr 04, 2023 at 08:30:36AM -0700, Christoph Hellwig wrote: > > On Tue, Apr 04, 2023 at 04:53:01PM +0200, Andrey Albershteyn wrote: > > > Not the whole folio always need to be verified by fs-verity (e.g. > > > with 1k blocks). Use passed folio's offset and size. > > > > Why can't those callers just call fsverity_verify_blocks directly? > > > > They can. Calling _verify_folio with explicit offset; size appeared > more clear to me. But I'm ok with dropping this patch to have full > folio verify function. Well, there is no point in a wrapper if it has the exact same signature and functionality as the functionality being wrapped. That being said, right now fsverity_verify_folio, so it might make sense to either rename it, or rename fsverity_verify_blocks to fsverity_verify_folio. But that's really a question for Eric.