Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7433206rwp; Tue, 18 Jul 2023 15:33:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEr38lNA224e9YtZf+if40OQurJuZQ9w7BJzLnuF6qAy/r/hoQqPkkHQGlVDGSSxrxIUnmA X-Received: by 2002:a2e:8952:0:b0:2b7:3633:2035 with SMTP id b18-20020a2e8952000000b002b736332035mr3186998ljk.32.1689719626891; Tue, 18 Jul 2023 15:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689719626; cv=none; d=google.com; s=arc-20160816; b=oJLqBI6CS6oUizAkMJSYCaTgMh1y4NUPEwDExKCcJDVMcNtuj40TwqUG9w3FMBpXWn gH2VyKeG6CtqjxEX4tqXWH4kBr+yGv/pVpCZP77SyWCRKPmcaEjPZJ6QsuoXdDgXUnTS uyO0DyZRa9wNjgfL7hp8Fj6dk04c74lvJ06UnVg2knhTimS7eEtVN3Z52I1ZvSW/AB1q IScecBcaZvj0vJRvEueMM3oouiqFmGSgrEiit7/NfNR3RkthuYSev+g7S7OI0ok1+ek4 XBWZNhlnK0iempD+b1QtUjsIgLj47Rvps1YCzBza25BA/MVC/jJfp0zumdJrVUN7hKpp ptCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aLC7t3CMDZ7VOXGMg9tZxQQGZ66gO6mRYQQcpnwKHxM=; fh=Pg+y9rv01Dn5L6soiKqM/8nH61E964SvXfXDEk17X/o=; b=MztRrPkHIACVyCW0wTcJe/8+HNbD1RiWpNOFkfx2rPAP5lrA7RjdnBy4HB67OWXOeQ NBuq7sxEePnm3K2n5o6dNjf3h4eP3AkqJyZKZTJcxKPri7FKxKl1IfmP98hTHcXJwUA9 7EwAPiLP0SaWHLfIZR+UpvAf/W3sI2XYxrL0wi7/IpEsVfClfKuoTkn0kF137SUxubMn e0lo+CfzilfGJw8Q4tn8QHTS0cztVJB6SdF7qylUwoMOrR4ymWsBhxecLqV1kMj5wJVc 77pmT/0xDLOcpMfZoCgVhPrsCdvldMtw43q5XmIf4fuTHysAFQ9w6O7w4+V8dqdcQHot v69w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ufuwLPWC; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020a1709062b9400b0098e1bbc3daesi1733763ejg.731.2023.07.18.15.33.14; Tue, 18 Jul 2023 15:33:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ufuwLPWC; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjGRWdD (ORCPT + 99 others); Tue, 18 Jul 2023 18:33:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjGRWdC (ORCPT ); Tue, 18 Jul 2023 18:33:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34BB19A1; Tue, 18 Jul 2023 15:32:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 77B5E61298; Tue, 18 Jul 2023 22:32:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41861C433C7; Tue, 18 Jul 2023 22:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689719561; bh=7Gbf5E8xcaK5OEKWGb4CHdLczRMlJnuQEgylfRoJijU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ufuwLPWCK8dWV8FkCqtCEz1epizX5iOUu9r0pzjEB8rAo3vv70aUHG7DaVTyC0KRg 9GffXUB6RPQfiH4Pwwly5QDNxRzp24n52b7+3LD9ARpF8rJiXrkrBeyyZXIPCRwCL3 YnFduPkPfkN/Xgp87N8DLRjyb4cFcZH/W6xsrlYbCUBOsPO7LPaSINVyNCf7nN7z43 VbtnrwxtgFI9aorRlk+A+3KII5/Vn0DPycSXnFotjqn6aFg9SWYv2fXiVGJgnhvXsX jEkhDeNqSzOymSxwFCvBFlJkeTEmz1CT/UJjdF6RKWm+b8SD1lfeb02J5lyYQ8cZJU KTXuktmKYxzVQ== Date: Tue, 18 Jul 2023 15:32:39 -0700 From: Eric Biggers To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, Herbert Xu , Kees Cook , Haren Myneni , Nick Terrell , Minchan Kim , Sergey Senozhatsky , Jens Axboe , Giovanni Cabiddu , Richard Weinberger , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Klassert , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, qat-linux@intel.com, linuxppc-dev@lists.ozlabs.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org Subject: Re: [RFC PATCH 01/21] crypto: scomp - Revert "add support for deflate rfc1950 (zlib)" Message-ID: <20230718223239.GB1005@sol.localdomain> References: <20230718125847.3869700-1-ardb@kernel.org> <20230718125847.3869700-2-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230718125847.3869700-2-ardb@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 > --- > crypto/deflate.c | 61 +++++----------- > crypto/testmgr.c | 8 +-- > crypto/testmgr.h | 75 -------------------- > 3 files changed, 18 insertions(+), 126 deletions(-) So if this is really unused, it's probably fair to remove it on that basis. However, it's not correct to claim that DEFLATE is obsoleted by zlib (the data format). zlib is just DEFLATE plus a checksum, as is gzip. Many users of zlib or gzip use an external checksum and therefore would be better served by DEFLATE, avoiding a redundant builtin checksum. Typically, people have chosen zlib or gzip simply because their compression library defaulted to it, they didn't understand the difference, and they overlooked that they're paying the price for a redundant builtin checksum. An example of someone doing it right is EROFS, which is working on adding DEFLATE support (not zlib or gzip!): https://lore.kernel.org/r/20230713001441.30462-1-hsiangkao@linux.alibaba.com Of course, they are using the library API instead of the clumsy crypto API. - Eric