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 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EDD3C76188 for ; Wed, 5 Apr 2023 17:50:59 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pk7Hc-0005II-OJ; Wed, 05 Apr 2023 17:50:55 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pk7Hc-0005IC-63 for linux-f2fs-devel@lists.sourceforge.net; Wed, 05 Apr 2023 17:50:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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: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=MRgvihe+1WyDTvsHn4M9QlfVv6sYj8QTdUgqotsbYXo=; b=TdB597+Pr7EWixOPPQEFo3NDdH 5cFYQWNk4olZvQVvV2+aUj/s2X3TExpkQXj0fXXI2lFyXk6+imG5qN2QJ8Pa1uTK955oR9GmzH86u gbpellBjo0I0PsxoW9qq+OXWm7Nl9uaD0CqyilJBIeDi+535sd5VOOKdNFO6g4dNUwd4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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: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=MRgvihe+1WyDTvsHn4M9QlfVv6sYj8QTdUgqotsbYXo=; b=gGpGMB4OeXx3xyv5ZspRHOxzu0 kpUeDXKtV+/nh1y2TWnFIDV+bsjthtuzBrWZebPfNQDxhvt9VsDe1qAncQ4CIFzMYyCcNX3aW3mR5 3F30urRLnmNLfB8zRw1AUPBGf9l7+/zbHJ8J4JJ++H1TzTh1E9QFmFCv47Wv/DLiQNQE=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pk7Ha-00GBrN-Mh for linux-f2fs-devel@lists.sourceforge.net; Wed, 05 Apr 2023 17:50:55 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4D5D663D5B; Wed, 5 Apr 2023 17:50:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66EE0C433D2; Wed, 5 Apr 2023 17:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680717048; bh=8RyRFaPwlCx6/LOIIjBet5SjJyIkLiaizKSwCarmDik=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N5ckeWaOWk8DYRS/vHEJFODUdFDterIWk0v6dwVPSI9Eqo5M3E9e4grJyjnLkrviz dmFQfemBW4Yipr4UCkQqWu/G0jjSFPpIfLv1Je78AwwHLIERp0PH1/vRe80YL6RRYZ JHue6126dFHFUdI0jGeczDDfabiD0M1vLyQEPVfbHZX3zYTjLfOHFds9uxGxs3TRQA 4MnoQS7XV3DutZNo5CjWayJ9Vw8uMHLtIdvQkc3cGo0pogH7TUG6lTRLj5yrPGYu4M tKZPz4nQeJIMNPgpgrINAMfcVgJNK3JNCa+gggxvfOkDxw9yi9kDdMaMWz6bTaOSji hhrgnfYs6HsxA== Date: Wed, 5 Apr 2023 17:50:46 +0000 From: Eric Biggers To: Christoph Hellwig 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-Disposition: inline In-Reply-To: X-Headers-End: 1pk7Ha-00GBrN-Mh Subject: Re: [f2fs-dev] [PATCH v2 05/23] fsverity: make fsverity_verify_folio() accept folio's offset and size X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fsverity@lists.linux.dev, cluster-devel@redhat.com, linux-ext4@vger.kernel.org, agruenba@redhat.com, djwong@kernel.org, Andrey Albershteyn , linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, dchinner@redhat.com, rpeterso@redhat.com, xiang@kernel.org, jth@kernel.org, linux-erofs@lists.ozlabs.org, damien.lemoal@opensource.wdc.com, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Apr 05, 2023 at 08:46:45AM -0700, Christoph Hellwig wrote: > 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. I thought it would be confusing for fsverity_verify_folio() to not actually verify a whole folio. So, for now we have: fsverity_verify_page: verify a whole page fsverity_verify_folio: verify a whole folio fsverity_verify_blocks: verify a range of blocks in a folio IMO that makes sense. Note: fsverity_verify_folio() is currently unused, but ext4 might use it. So, just use fsverity_verify_blocks(). - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel