[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZLpLnx4vtdYPuxrH@corigine.com>
Date: Fri, 21 Jul 2023 10:10:55 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: linux-crypto@...r.kernel.org, Herbert Xu <herbert@...dor.apana.org.au>,
Eric Biggers <ebiggers@...nel.org>,
Kees Cook <keescook@...omium.org>, Haren Myneni <haren@...ibm.com>,
Nick Terrell <terrelln@...com>, Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jens Axboe <axboe@...nel.dk>,
Giovanni Cabiddu <giovanni.cabiddu@...el.com>,
Richard Weinberger <richard@....at>,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Steffen Klassert <steffen.klassert@...unet.com>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
qat-linux@...el.com, linuxppc-dev@...ts.ozlabs.org,
linux-mtd@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [RFC PATCH 01/21] crypto: scomp - Revert "add support for
deflate rfc1950 (zlib)"
On Tue, Jul 18, 2023 at 02:58:27PM +0200, Ard Biesheuvel wrote:
> This reverts commit a368f43d6e3a001e684e9191a27df384fbff12f5.
>
> "zlib-deflate" was introduced 6 years ago, but it does not have any
> users. So let's remove the generic implementation and the test vectors,
> but retain the "zlib-deflate" entry in the testmgr code to avoid
> introducing warning messages on systems that implement zlib-deflate in
> hardware.
>
> Note that RFC 1950 which forms the basis of this algorithm dates back to
> 1996, and predates RFC 1951, on which the existing IPcomp is based and
> which we have supported in the kernel since 2003. So it seems rather
> unlikely that we will ever grow the need to support zlib-deflate.
>
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
> crypto/deflate.c | 61 +++++-----------
> crypto/testmgr.c | 8 +--
> crypto/testmgr.h | 75 --------------------
> 3 files changed, 18 insertions(+), 126 deletions(-)
>
> diff --git a/crypto/deflate.c b/crypto/deflate.c
> index b2a46f6dc961e71d..f4f127078fe2a5aa 100644
> --- a/crypto/deflate.c
> +++ b/crypto/deflate.c
> @@ -39,24 +39,20 @@ struct deflate_ctx {
> struct z_stream_s decomp_stream;
> };
>
> -static int deflate_comp_init(struct deflate_ctx *ctx, int format)
> +static int deflate_comp_init(struct deflate_ctx *ctx)
> {
> int ret = 0;
> struct z_stream_s *stream = &ctx->comp_stream;
>
> stream->workspace = vzalloc(zlib_deflate_workspacesize(
> - MAX_WBITS, MAX_MEM_LEVEL));
> + -DEFLATE_DEF_WINBITS, DEFLATE_DEF_MEMLEVEL));
> if (!stream->workspace) {
> ret = -ENOMEM;
> goto out;
> }
> - if (format)
> - ret = zlib_deflateInit(stream, 3);
> - else
> - ret = zlib_deflateInit2(stream, DEFLATE_DEF_LEVEL, Z_DEFLATED,
> - -DEFLATE_DEF_WINBITS,
> - DEFLATE_DEF_MEMLEVEL,
> - Z_DEFAULT_STRATEGY);
> + ret = zlib_deflateInit2(stream, DEFLATE_DEF_LEVEL, Z_DEFLATED,
> + -DEFLATE_DEF_WINBITS, DEFLATE_DEF_MEMLEVEL,
> + Z_DEFAULT_STRATEGY);
nit: The two lines above partially use spaces instead of tabs for
indentation.
...
Powered by blists - more mailing lists