From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "Eric Biggers" <ebiggers@kernel.org>,
"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 16:14:10 +0800 [thread overview]
Message-ID: <Z9vOUut7CWJK0kVJ@gondor.apana.org.au> (raw)
In-Reply-To: <CAMj1kXGAokDnf_spFU85qCh+quU4eewgWwCO6-UpCWDdf5Q0Og@mail.gmail.com>
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?
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.
My understanding is that the workaround is not about Z_SYNC_FLUSH
but feeding an extra byte to the decompressor. The only difference
between Z_SYNC_FLUSH and Z_FLUSH on inflate is that one would return
Z_OK while the other returns Z_BUF_ERROR, both are treated as an
error by crypto/deflate.c.
> Do your tests have coverage for all the conditional cases there?
If you mean the scatterlists then yes I have coverage for that.
If you mean the USAGI workaround then no because I don't know what
triggered the original problem.
I do note however that zcomp which also contains deflate does not
have this workaround either. If it was really necessary then zram
would have run into it and screamed loudly about not being able to
decompress a page. Or perhaps nobody ever uses zram with deflate.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2025-03-20 8:14 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 [this message]
2025-03-20 8:55 ` Ard Biesheuvel
2025-03-20 17:34 ` Eric Biggers
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=Z9vOUut7CWJK0kVJ@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ardb@kernel.org \
--cc=ebiggers@kernel.org \
--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