lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <ZDB1dPVjon4Qthok@gmail.com> Date: Fri, 7 Apr 2023 19:56:36 +0000 From: Eric Biggers <ebiggers@...nel.org> To: Dave Chinner <david@...morbit.com> Cc: "Darrick J. Wong" <djwong@...nel.org>, Andrey Albershteyn <aalbersh@...hat.com>, dchinner@...hat.com, hch@...radead.org, linux-xfs@...r.kernel.org, fsverity@...ts.linux.dev, rpeterso@...hat.com, agruenba@...hat.com, xiang@...nel.org, chao@...nel.org, damien.lemoal@...nsource.wdc.com, jth@...nel.org, linux-erofs@...ts.ozlabs.org, linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, cluster-devel@...hat.com Subject: Re: [PATCH v2 21/23] xfs: handle merkle tree block size != fs blocksize != PAGE_SIZE 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
Powered by blists - more mailing lists