Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp211033rwe; Fri, 26 Aug 2022 03:47:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR4DjTHUVqBWl8QlWvnE7M9O45Ia/cNdeHJs46yvpaK3Tkzb67MQWjoAu1Qhz0ZgRic8cBbc X-Received: by 2002:a17:907:a0c6:b0:73d:bf46:f06b with SMTP id hw6-20020a170907a0c600b0073dbf46f06bmr5077890ejc.127.1661510834220; Fri, 26 Aug 2022 03:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661510834; cv=none; d=google.com; s=arc-20160816; b=H+i25Q9xClQ43cerY82tR1CQfycxYqnfKsQ98PyXkv3vqFj23sopSoF1ito5wQifG3 2rMg9WzhzFzflZDo4WPAupgdxzLNwKnTDAEzPrh9+RpYp2alYesJH/hc1eWeuv0y/e5l 52ukOR1BLad7RkqY1vSluRpJ385OqBCxQKLkl31o/uKTNEK/j3aHmu8Wn05zGCi6nQJU /jHHl6sL+ZgwfCXjdQD7Yr1XHhP7SaDnq70QC1yxq8JeDgLaZqfuFKiZCgiJmHSe8aBJ Zc6XfUAGVZwapmUXe58fqWZKffn/SDnHkATRkQSm+5e6S8l+IxziVNssTySJlkOg7i2+ xgiQ== 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; bh=7qYskJ0g89APoSlVpNuHJ8F4P2cWlU3edR94WyUrHg4=; b=Q9CVoD31BC0qSGrCc6qWoaPR3oBEqFs9PdXb6A4LMfxkwABttH2h3phBv6SyyBmQtL kYZyhOd2vV/ys4IqsNSRdery9iGU/dTM9ICiOm15cLVWTEkqx99cixveoPuWX/4/pezP irrSwkZC5lw3xwQEJ1xz5Xxa5toJcAetoo8hsVew4g9lC9N/TdX+OPTfXl+ScWiikwmR JFoN9x66PomlGvhINWYMxnqcscqRZTAElc2OfBkPDP0kkTae1GBVG/uIwxqVb2EiRp0E 15db6ZBxdxH2GDsPcTto7+h/t+r9dU2B96whhJd8ITC1IcyxF5dpt8osowRQ4Jwh06Ud lnMg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a170906854b00b0073d7d0aaa16si1166723ejy.226.2022.08.26.03.46.39; Fri, 26 Aug 2022 03:47:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245027AbiHZK25 (ORCPT + 99 others); Fri, 26 Aug 2022 06:28:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343702AbiHZK2z (ORCPT ); Fri, 26 Aug 2022 06:28:55 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07D3BD0744 for ; Fri, 26 Aug 2022 03:28:53 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oRWa0-00FPJ3-Bd; Fri, 26 Aug 2022 20:28:49 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 26 Aug 2022 18:28:48 +0800 Date: Fri, 26 Aug 2022 18:28:48 +0800 From: Herbert Xu To: Giovanni Cabiddu Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Vlad Dronov , Wojciech Ziemba , Adam Guerin Subject: Re: [PATCH 8/9] crypto: qat - expose deflate through acomp api for QAT GEN2 Message-ID: References: <20220818180120.63452-1-giovanni.cabiddu@intel.com> <20220818180120.63452-9-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220818180120.63452-9-giovanni.cabiddu@intel.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Thu, Aug 18, 2022 at 07:01:19PM +0100, Giovanni Cabiddu wrote: > > + /* Handle acomp requests that require the allocation of a destination > + * buffer. The size of the destination buffer is double the source > + * buffer to fit the decompressed output or an expansion on the > + * data for compression. > + */ > + if (!areq->dst) { > + dlen = 2 * slen; > + areq->dst = sgl_alloc(dlen, f, NULL); > + if (!areq->dst) > + return -ENOMEM; > + } So what happens if the decompressed result is more than twice as long as the source? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt