Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
	"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
	"Sergey Senozhatsky" <senozhatsky@chromium.org>,
	"YOSHIFUJI Hideaki/吉藤英明" <hideaki.yoshifuji@miraclelinux.com>
Subject: Re: [PATCH 0/3] crypto: Add SG support to deflate
Date: Thu, 20 Mar 2025 17:34:50 +0000	[thread overview]
Message-ID: <20250320173450.GA697647@google.com> (raw)
In-Reply-To: <CAMj1kXHXZoaf3H4brxm2O+mvw0iebEUkO2euNj4CeDVn4dz40w@mail.gmail.com>

On Thu, Mar 20, 2025 at 09:55:42AM +0100, Ard Biesheuvel wrote:
> On Thu, 20 Mar 2025 at 09:14, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >
> > On Thu, Mar 20, 2025 at 08:51:40AM +0100, Ard Biesheuvel wrote:
> > >
> > > IIRC Eric had some feedback at the time regarding the exact behavior
> > > of the zlib API, and I notice that the code no longer deals with
> > > Z_SYNC_FLUSH at all, which I did handle in my version of patch #3.
> >
> > I didn't see any feedback regarding this when looking at your patch:
> >
> > https://lore.kernel.org/linux-crypto/20230718125847.3869700-21-ardb@kernel.org/
> >
> > Do you have a link to that discussion?
> >
> 
> No. I did some digging but I could find anything. Eric might remember.

I'm not sure what this is referring to.

Then again this patchset doesn't apply, so it's unreviewable anyway.

Just a note, for compression and decompression it's often more efficient to
linearize in the caller.  Otherwise the algorithm ends up having to copy the
uncompressed data to an internal buffer anyway.  That's needed for the match
finding (compression) and match copying (decompression) to work.

As I mentioned before, the "stream" terminology that Herbert is choosing for
some reason also seems less than ideal.  "workspace" would be better.  Many of
the compression algorithms don't even support streaming.

> > I was going to add the original USAGI workaround but then I
> > thought perhaps it is no longer necessary as our zlib has
> > been updated since the workaround was added back in 2003.

The kernel's zlib was forked from upstream zlib in the 90s and hasn't been
re-synced since then.

- Eric

  reply	other threads:[~2025-03-20 17:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  6:04 [PATCH 0/3] crypto: Add SG support to deflate Herbert Xu
2025-03-19  6:04 ` [PATCH 1/3] crypto: acomp - Move scomp stream allocation code into acomp Herbert Xu
2025-03-19  6:04 ` [PATCH 2/3] crypto: acomp - Add acomp_walk Herbert Xu
2025-03-19  6:04 ` [PATCH 3/3] crypto: deflate - Convert to acomp Herbert Xu
2025-03-20  7:51 ` [PATCH 0/3] crypto: Add SG support to deflate Ard Biesheuvel
2025-03-20  8:14   ` Herbert Xu
2025-03-20  8:55     ` Ard Biesheuvel
2025-03-20 17:34       ` Eric Biggers [this message]
2025-03-21  2:36         ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250320173450.GA697647@google.com \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=hideaki.yoshifuji@miraclelinux.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox