From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: [PATCH] crypto: acomp - Add missing return statements in compress/decompress
Date: Fri, 18 Apr 2025 10:52:34 +0800 [thread overview]
Message-ID: <aAG-chUuldQisBIA@gondor.apana.org.au> (raw)
In-Reply-To: <20250417183927.GD800@quark.localdomain>
On Thu, Apr 17, 2025 at 11:39:27AM -0700, Eric Biggers wrote:
>
> And this series does not apply to current cryptodev/master.
>
> So there's no way to apply this series to review it.
Yes it's conflicting with the powerpc uaccess patch. I'll repost.
> I think the high-level idea is still suspect, as I said before. Especially for
> sha256 and sha512 which I will be fixing to have proper library APIs. I don't
> think it's particularly helpful to be futzing around with how those are
> integrated into shash when I'll be fixing it properly soon.
As I said it's not that big a deal for shash, but the reason I'm
doing it for shash as well as ahash is to maintain a consistent
export format so that ahash can fallback to shash at any time.
I did try to keep the sha256 library interface working so as not to
impede your work on that.
> But whatever, as usual for your submissions this will get pushed out anyway,
> likely without running the tests (FYI the compression tests are already failing
> on cryptodev/master due to your recent changes).
The shash algorithm has gone through all the usual tests.
Thanks for reporting the deflate breakage. I wasn't expecting that as
the change in question didn't actually touch deflate.
Cheers,
---8<---
The return statements were missing which causes REQ_CHAIN algorithms
to execute twice for every request.
Reported-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 64929fe8c0a4 ("crypto: acomp - Remove request chaining")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/crypto/acompress.c b/crypto/acompress.c
index b0f9192f6b2e..4c665c6fb5d6 100644
--- a/crypto/acompress.c
+++ b/crypto/acompress.c
@@ -292,7 +292,7 @@ int crypto_acomp_compress(struct acomp_req *req)
if (acomp_req_on_stack(req) && acomp_is_async(tfm))
return -EAGAIN;
if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
- crypto_acomp_reqtfm(req)->compress(req);
+ return crypto_acomp_reqtfm(req)->compress(req);
return acomp_do_req_chain(req, true);
}
EXPORT_SYMBOL_GPL(crypto_acomp_compress);
@@ -304,7 +304,7 @@ int crypto_acomp_decompress(struct acomp_req *req)
if (acomp_req_on_stack(req) && acomp_is_async(tfm))
return -EAGAIN;
if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
- crypto_acomp_reqtfm(req)->decompress(req);
+ return crypto_acomp_reqtfm(req)->decompress(req);
return acomp_do_req_chain(req, false);
}
EXPORT_SYMBOL_GPL(crypto_acomp_decompress);
--
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
prev parent reply other threads:[~2025-04-18 2:52 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 6:42 [PATCH 00/67] crypto: shash - Handle partial blocks in API Herbert Xu
2025-04-16 6:42 ` [PATCH 01/67] " Herbert Xu
2025-04-16 6:42 ` [PATCH 02/67] crypto: blake2b-generic - Use API partial block handling Herbert Xu
2025-04-16 6:42 ` [PATCH 03/67] crypto: arm/blake2b " Herbert Xu
2025-04-16 6:42 ` [PATCH 04/67] crypto: ghash-generic " Herbert Xu
2025-04-16 6:42 ` [PATCH 05/67] crypto: powerpc/ghash " Herbert Xu
2025-04-16 6:42 ` [PATCH 06/67] crypto: arm/ghash " Herbert Xu
2025-04-16 6:42 ` [PATCH 07/67] crypto: arm64/ghash " Herbert Xu
2025-04-16 6:43 ` [PATCH 08/67] crypto: riscv/ghash " Herbert Xu
2025-04-16 6:43 ` [PATCH 09/67] crypto: s390/ghash " Herbert Xu
2025-04-16 6:43 ` [PATCH 10/67] crypto: x86/ghash " Herbert Xu
2025-04-16 6:43 ` [PATCH 11/67] crypto: md5-generic " Herbert Xu
2025-04-16 6:43 ` [PATCH 12/67] crypto: mips/octeon-md5 " Herbert Xu
2025-04-16 6:43 ` [PATCH 13/67] crypto: powerpc/md5 " Herbert Xu
2025-04-16 6:43 ` [PATCH 14/67] crypto: sparc/md5 " Herbert Xu
2025-04-16 6:43 ` [PATCH 15/67] crypto: x86/sha1 " Herbert Xu
2025-04-16 6:43 ` [PATCH 16/67] crypto: arm64/sha1 " Herbert Xu
2025-04-16 6:43 ` [PATCH 17/67] crypto: mips/octeon-sha1 " Herbert Xu
2025-04-16 6:43 ` [PATCH 18/67] crypto: sha1-generic " Herbert Xu
2025-04-16 6:43 ` [PATCH 19/67] crypto: arm/sha1-ce " Herbert Xu
2025-04-16 6:43 ` [PATCH 20/67] crypto: arm/sha1-neon " Herbert Xu
2025-04-16 6:43 ` [PATCH 21/67] crypto: arm/sha1-asm " Herbert Xu
2025-04-16 6:43 ` [PATCH 22/67] crypto: powerpc/sha1 " Herbert Xu
2025-04-16 6:43 ` [PATCH 23/67] crypto: powerpc/sha1-spe " Herbert Xu
2025-04-16 6:43 ` [PATCH 24/67] crypto: s390/sha1 " Herbert Xu
2025-04-16 6:43 ` [PATCH 25/67] crypto: sparc/sha1 " Herbert Xu
2025-04-16 6:43 ` [PATCH 26/67] crypto: sha1_base - Remove partial block helpers Herbert Xu
2025-04-16 6:43 ` [PATCH 27/67] crypto: x86/sha256 - Use API partial block handling Herbert Xu
2025-04-16 6:43 ` [PATCH 28/67] crypto: mips/octeon-sha256 " Herbert Xu
2025-04-16 6:43 ` [PATCH 29/67] crypto: riscv/sha256 " Herbert Xu
2025-04-16 6:43 ` [PATCH 30/67] crypto: sha256-generic " Herbert Xu
2025-04-16 6:43 ` [PATCH 31/67] crypto: arm/sha256-ce " Herbert Xu
2025-04-16 6:43 ` [PATCH 32/67] crypto: arm/sha256-neon " Herbert Xu
2025-04-16 6:43 ` [PATCH 33/67] crypto: arm/sha256-asm " Herbert Xu
2025-04-16 6:44 ` [PATCH 34/67] crypto: arm64/sha256-ce " Herbert Xu
2025-04-16 6:44 ` [PATCH 35/67] crypto: arm64/sha256 " Herbert Xu
2025-04-16 6:44 ` [PATCH 36/67] crypto: powerpc/sha256-spe " Herbert Xu
2025-04-16 6:44 ` [PATCH 37/67] crypto: s390/sha256 " Herbert Xu
2025-04-16 6:44 ` [PATCH 38/67] crypto: sparc/sha256 " Herbert Xu
2025-04-16 6:44 ` [PATCH 39/67] crypto: sha256_base - Remove partial block helpers Herbert Xu
2025-04-16 6:44 ` [PATCH 40/67] crypto: arm64/sha3-ce - Use API partial block handling Herbert Xu
2025-04-16 6:44 ` [PATCH 41/67] crypto: s390/sha3 " Herbert Xu
2025-04-16 6:44 ` [PATCH 42/67] crypto: sha3-generic " Herbert Xu
2025-04-16 6:44 ` [PATCH 43/67] crypto: zynqmp-sha " Herbert Xu
2025-04-16 6:44 ` [PATCH 44/67] crypto: x86/sha512 " Herbert Xu
2025-04-16 6:44 ` [PATCH 45/67] crypto: mips/octeon-sha512 " Herbert Xu
2025-04-16 6:44 ` [PATCH 46/67] crypto: riscv/sha512 " Herbert Xu
2025-04-16 6:44 ` [PATCH 47/67] crypto: sha512-generic " Herbert Xu
2025-04-16 6:44 ` [PATCH 48/67] crypto: arm/sha512-neon " Herbert Xu
2025-04-16 6:44 ` [PATCH 49/67] crypto: arm/sha512-asm " Herbert Xu
2025-04-16 6:44 ` [PATCH 50/67] crypto: arm64/sha512-ce " Herbert Xu
2025-04-16 6:44 ` [PATCH 51/67] crypto: arm/sha512 " Herbert Xu
2025-04-16 6:44 ` [PATCH 52/67] crypto: s390/sha512 " Herbert Xu
2025-04-16 6:44 ` [PATCH 53/67] crypto: sparc/sha512 " Herbert Xu
2025-04-16 6:44 ` [PATCH 54/67] crypto: sha512_base - Remove partial block helpers Herbert Xu
2025-04-16 6:44 ` [PATCH 55/67] crypto: sm3-generic - Use API partial block handling Herbert Xu
2025-04-16 6:44 ` [PATCH 56/67] crypto: arm64/sm3-ce " Herbert Xu
2025-04-16 6:44 ` [PATCH 57/67] crypto: arm64/sm3-neon " Herbert Xu
2025-04-16 6:44 ` [PATCH 58/67] crypto: riscv/sm3 " Herbert Xu
2025-04-16 6:44 ` [PATCH 59/67] crypto: x86/sm3 " Herbert Xu
2025-04-16 6:45 ` [PATCH 60/67] crypto: lib/sm3 - Remove partial block helpers Herbert Xu
2025-04-16 6:45 ` [PATCH 61/67] crypto: cbcmac - Use API partial block handling Herbert Xu
2025-04-16 6:45 ` [PATCH 62/67] crypto: cmac " Herbert Xu
2025-04-16 6:45 ` [PATCH 63/67] crypto: xcbc " Herbert Xu
2025-04-16 6:45 ` [PATCH 64/67] crypto: arm64/aes " Herbert Xu
2025-04-16 6:45 ` [PATCH 65/67] crypto: arm64/sm4 " Herbert Xu
2025-04-16 6:45 ` [PATCH 66/67] crypto: nx " Herbert Xu
2025-04-16 6:45 ` [PATCH 67/67] crypto: padlock-sha " Herbert Xu
2025-04-17 18:39 ` [PATCH 00/67] crypto: shash - Handle partial blocks in API Eric Biggers
2025-04-18 2:52 ` Herbert Xu [this message]
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=aAG-chUuldQisBIA@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ebiggers@kernel.org \
--cc=linux-crypto@vger.kernel.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