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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b7d6e6292c64f21b8d09def1b6723f02faffe88@linux.dev>
Date: Wed, 07 Jan 2026 05:39:50 +0000
From: "Yosry Ahmed" <yosry.ahmed@...ux.dev>
To: "Herbert Xu" <herbert@...dor.apana.org.au>
Cc: "Sergey Senozhatsky" <senozhatsky@...omium.org>, "Andrew Morton"
 <akpm@...ux-foundation.org>, "Nhat Pham" <nphamcs@...il.com>, "Minchan
 Kim" <minchan@...nel.org>, "Johannes Weiner" <hannes@...xchg.org>, "Brian
 Geffon" <bgeffon@...gle.com>, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org
Subject: Re: [RFC PATCH 2/2] zsmalloc: chain-length configuration should
 consider other metrics

January 6, 2026 at 9:25 PM, "Herbert Xu" <herbert@...dor.apana.org.au> wrote:


> 
> On Tue, Jan 06, 2026 at 04:24:45PM +0000, Yosry Ahmed wrote:
> 
> > 
> > Just to clarify, IIUC the SG support would mean that zram or zswap can
> >  pass a non-contiguous SG-list to the crypto API, regardless of
> >  compressor support. I assume that the crypto layer will either pass the
> >  SG-list as-is to the compressor if it supports it, or copy it into
> >  scratch space to be contiguous if needed.
> > 
> >  So zswap, for example, will get an SG list from zsmalloc and pass it
> >  directly to the crypto API for decompression. Then the effort to add
> >  support to compressors can be done separately.
> >  
> >  Did I get this right?
> > 
> Correct, you can already do that today with the scomp layer providing
> the fallback linearisation.

In this case I think we can just make zsmalloc return an SG list and use it in both zswap and zram. We will fallback to the memcpy() in scomp instead of the memcpy() in zsmalloc, and we'll drop the memcpy() logic in zswap as a bonus.

Will this for acomp though?

> 
> Adding native SG support to LZO simply means removing the memcpy that
> scomp would otherwise have to do.

Yeah the effort to add native support to compressors can be done separately. For zswap, I think the most common compressors are actually zstd and LZ4.

> 
> Cheers,
> -- 
> Email: Herbert Xu <>
> 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