Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1280005rwl; Fri, 7 Apr 2023 13:00:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bmSaX2oTN4LSgS1Sdvg5Xswb9fqi0iukcKlXj/cXQTM6L9FyO9giRKkC0QwQldZAUEoviO X-Received: by 2002:a05:6402:3550:b0:504:6f39:8d1e with SMTP id f16-20020a056402355000b005046f398d1emr5158790edd.0.1680897657237; Fri, 07 Apr 2023 13:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680897657; cv=none; d=google.com; s=arc-20160816; b=iRHnJ6cdzVnXTpLGp3TwsM1Z9MowEzoYcyauWbPN4mnd5K3XbGy+UnetMkbFca2nB0 N9ZOZAnBEVc9F0gYNZNWVCOnpHTGdCiQhNK0E7idUnMKnVHnZA4q3fQXYG1MrmHUyTZs NsbKzLwNczRozqVBsQLngFTH/ddZuplxQ1bXa7vdSvlhKsbYzIqTO8IaSV8Sn5BRdpFh wnGFtyq5Ux11XTnoo9qcI1CPOUMjKiqqoC7VW4jAPMnkx8p8v91Y3gTRcxmiJhZySgAW HhZdHayS2X4nverMBXPCKPrnD/i1Z+FN+3ptplvDdfOmhRa46VsDyXrcQHgbsjuFmav7 7+Tg== 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=L7nMWz4T8dPG2YqHE7NChcSp4hpglr9wYt0Ce31DYKY=; b=J9zJvVoB91P7Be/2X2mDehI0Mf55jiSVOWofo3OWgcNR4yeKRz7hrkXCCyG8ivn2iO Oy72YlxXxiLYpe4RVhOvPWEp6J98P362K672trI182C9xPVdABXtPEXN8zYH/Rgl4pd5 0BYBeXvgFn+l7UBgcRO9OHkFoTlyp2aeEEminaIEvduRsvTrWXiEa92lJdUK+dFeN91X q368M4VujMahu3QKdV7FvZCjK+jb5K4vtZ4PdfviabWl0iJpzuzNFbQLRtNXgVr5sR7S ZO6yHCy3UPWMNWjdknuzogGNPh6aQ8poYVho50PV5IECTx1827ALb40Kp01QCZ+wQubO ncdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=clCdqAdS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020aa7d0c6000000b004fcbc158671si734273edo.378.2023.04.07.13.00.24; Fri, 07 Apr 2023 13:00:57 -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=@kernel.org header.s=k20201202 header.b=clCdqAdS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230465AbjDGT4s (ORCPT + 99 others); Fri, 7 Apr 2023 15:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbjDGT4r (ORCPT ); Fri, 7 Apr 2023 15:56:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCA2EAD38; Fri, 7 Apr 2023 12:56:38 -0700 (PDT) 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 584E565316; Fri, 7 Apr 2023 19:56:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67E35C433D2; Fri, 7 Apr 2023 19:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680897397; bh=/3ooAeWJ2heTTSe1+fowce2OJCbJkwMvCSSAiGy5dOI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=clCdqAdSzIuv2Nh0psGWcWmbbwrVRtKcUMCziwd5jIFOLppq8+hvEMy6JY4RJLPMp x59uWAeV4ig4ih4U7jNLyVsnpfqrD7RpPe3yfp1MP72D2FoXdLnTk3xUAdXqNiTo76 7873hQHGayV2JBek9f5U/Qb89gRu184TbrlBQn0ysEteLtxdwRM5mb1J34RmFP0nuB 8OYIQ3NfXnHpi+fJ2/tbB2xh0PRWi+ynfmrw1NaYWHy7dBecQ4XC5MBSI2cP1pxqcR lMdFOAY4ytF24DuMMy3hoLnO4nDVkkibtBGuHd2D5IXcvpFkh35CRNw0rf+xT87I1L SBA+hcx/gQt+g== Date: Fri, 7 Apr 2023 19:56:36 +0000 From: Eric Biggers To: Dave Chinner Cc: "Darrick J. Wong" , Andrey Albershteyn , dchinner@redhat.com, hch@infradead.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 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE Message-ID: References: <20230404145319.2057051-1-aalbersh@redhat.com> <20230404145319.2057051-22-aalbersh@redhat.com> <20230404163602.GC109974@frogsfrogsfrogs> <20230405160221.he76fb5b45dud6du@aalbersh.remote.csb> <20230405163847.GG303486@frogsfrogsfrogs> <20230405222646.GR3223426@dread.disaster.area> <20230405233753.GU3223426@dread.disaster.area> <20230406004434.GA879@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406004434.GA879@sol.localdomain> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 05:44:36PM -0700, Eric Biggers wrote: > > Not vmalloc'ed, but vmapped. we allocate the pages individually, but > > then call vm_map_page() to present the higher level code with a > > single contiguous memory range if it is a multi-page buffer. > > > > We do have the backing info held in the buffer, and that's what we > > use for IO. If fsverity needs a page based scatter/gather list > > for hardware offload, it could ask the filesystem to provide it > > for that given buffer... > > > > > BTW, converting fs/verity/ from ahash to shash is an option; I've really never > > > been a fan of the scatterlist-based crypto APIs! The disadvantage of doing > > > this, though, would be that it would remove support for all the hardware crypto > > > drivers. > > > > > > That *might* actually be okay, as that approach to crypto acceleration > > > has mostly fallen out of favor, in favor of CPU-based acceleration. But I do > > > worry about e.g. someone coming out of the woodwork and saying they need to use > > > fsverity on a low-powered ARM board that has a crypto accelerator like CAAM, and > > > they MUST use their crypto accelerator to get acceptable performance. > > > > True, but we are very unlikely to be using XFS on such small > > systems and I don't think we really care about XFS performance on > > android sized systems, either. > > > > FYI, I've sent an RFC patch that converts fs/verity/ from ahash to shash: > https://lore.kernel.org/r/20230406003714.94580-1-ebiggers@kernel.org > > It would be great if we could do that. But I need to get a better sense for > whether anyone will complain... FWIW, dm-verity went in the other direction. It started with shash, and then in 2017 it was switched to ahash by https://git.kernel.org/linus/d1ac3ff008fb9a48 ("dm verity: switch to using asynchronous hash crypto API"). I think that was part of my motivation for using ahash in fsverity from the beginning. Still, it does seem that ahash is more trouble than it's worth these days... - Eric