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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zj3W7OK9kDpneKXR@gondor.apana.org.au>
Date: Fri, 10 May 2024 16:12:28 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Christoph Hellwig <hch@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan@...nel.org>, linux-kernel@...r.kernel.org,
	linux-block@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	linux-crypto@...r.kernel.org
Subject: Re: [PATCHv3 00/19] zram: convert to custom compression API and
 allow algorithms tuning

On Fri, May 10, 2024 at 05:08:27PM +0900, Sergey Senozhatsky wrote:
>
> For some algorithms params needs to be set before ctx is created.
> For example zstd, crypto/zstd calls zstd_get_params(ZSTD_DEF_LEVEL, 0)
> to estimate workspace size, which misses the opportunity to configure
> it an way zram/zswap can benefit from, because those work with PAGE_SIZE
> source buffer.  So for zram zstd_get_params(ZSTD_DEF_LEVEL, PAGE_SIZE)
> is much better (it saves 1.2MB per ctx, which is per-CPU in zram).  Not
> to mention that zstd_get_params(param->level, 0) is what we need at the
> end.

For these algorithms where the overhead of allocating a default
set of parameters and then changing them on a setparam call is
too high, we could stipulate that the tfm can only be used after
a setparam call (just as we require a setkey before cipher ops).

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ