Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3368358imw; Mon, 11 Jul 2022 07:23:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6LHpB543KoIxHlx0I20s4gBtfPFUZBTVWLQAwk43dgD8/kp+uD92VJGaP1ogeAgVn+Oz0 X-Received: by 2002:a17:906:7e43:b0:72b:52de:b039 with SMTP id z3-20020a1709067e4300b0072b52deb039mr5895315ejr.198.1657549408715; Mon, 11 Jul 2022 07:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657549408; cv=none; d=google.com; s=arc-20160816; b=UGPfE54ALQawdV5nJC9Tmo5pcZOBrjtZ4DXK2+Hu8+Cht9B+8+VDerWjXvXdXVpqwJ 43t9OdES/9EYvhN6F0lvpBoaQD0ZQ70X4rQcQKRIoqElAlgrbg/VaUZaOGn2h2jqKZMp 15F2J7ra25qzFm3gpCrr64UshM3iOHuQwYwwFhzlz54MxaaZ0UGSH4FmG3GeFM12IuxI kO0gWQ/fMljT+wcOETlZY+DWIwWTuscfikdTpE0q3NxCOTlXg0C5gpsTGby1+IGFwGhj gkGwEmnfexxG1+EE/HtytvI51qrQ4gnZcC0RdTyWJ10FOKmtOBWhfqyC1hHFoJanopLZ pknQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SIJieoPRvrsZFqIq41x9Yv4JjnSJAnd0awOrcsA2s18=; b=T9jTqcoPzpoh4rdTFhKUZogzVuFacJ71lMmgn/JOnis6YPIiEO4EdttG5UqMVWNo4P B8SNZrn/Ab5KJ++RAHnV3n/ViT40Yek0GOt2XhbEJGPGNXjrJqvI+nY77WyhvxyZn4qK 1ZXFIXTXO2qnnhmO43tRQZ4bIbw0VgCtFS6kFDLJqaJZJMLabxWyGGTPz6GSWgUzt1DI rgfD0C/GU06UvABlpa0vSNCNvOxFXlyc3QK8yJCyfgaPVYzsKeshaiZvZ5ryQq1IsTfa GcEe2l2SHSo01SbLJ44IhE7fFWxOY1Z37wK9r4QOiu3bbePmfLedx8AK5x2SoEKswJkF H4qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C+Z0UlAu; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk10-20020a170906c9ca00b00726be5e715dsi9886903ejb.796.2022.07.11.07.22.58; Mon, 11 Jul 2022 07:23:28 -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=@intel.com header.s=Intel header.b=C+Z0UlAu; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbiGKOWL (ORCPT + 99 others); Mon, 11 Jul 2022 10:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbiGKOVv (ORCPT ); Mon, 11 Jul 2022 10:21:51 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B508C67169; Mon, 11 Jul 2022 07:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657549309; x=1689085309; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=A/xwrdAxYXsA63RbLzyW7L2rIbPha0EngocXXdoox2M=; b=C+Z0UlAu+ySencYq6s1jm5PNfEu7hgjIc4OQkdfKQFWf6G5quDMskYTQ OEJQlWrSQLOhmn8MhG+5RsWPVrf21THsVu8jD9FFcS40D7dBWWTYe3WW4 SgFcUEoP1UlwqA8w+At/nxVyBy93m2njP3pChSoliobgKwJUERy1EjRsg ANVjaC62JOgr5rtEJ5uyq+++wz1x6Xybmu/shc9nsrnXkMqTxjOA0y1Cr deCzpLpoe1A5U2dtaLVamR7XU3ziozkRix7Mv/YE1F7UjVN5FcYOL/MWT XyC7T4Fl/tar2lxL2goJrYYP6dRSwLMqGU4YoorB5g8PxDVQ5ISbhOgrP A==; X-IronPort-AV: E=McAfee;i="6400,9594,10404"; a="348652380" X-IronPort-AV: E=Sophos;i="5.92,263,1650956400"; d="scan'208";a="348652380" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 07:21:49 -0700 X-IronPort-AV: E=Sophos;i="5.92,263,1650956400"; d="scan'208";a="662564681" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314) ([10.237.222.76]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 07:21:46 -0700 Date: Mon, 11 Jul 2022 15:21:39 +0100 From: Giovanni Cabiddu To: Eric Biggers Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, qat-linux@intel.com, stable@vger.kernel.org, Mikulas Patocka , Marco Chiappero , Wojciech Ziemba , Lucas Segarra Fernandez Subject: Re: [PATCH v3 1/3] crypto: qat - use pre-allocated buffers in datapath Message-ID: References: <20220410194707.9746-1-giovanni.cabiddu@intel.com> <20220410194707.9746-2-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland X-Spam-Status: No, score=-5.0 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_NONE,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 Mon, Apr 11, 2022 at 05:37:24PM +0000, Eric Biggers wrote: > On Sun, Apr 10, 2022 at 08:47:05PM +0100, Giovanni Cabiddu wrote: > > If requests exceed 4 entries buffers, memory is allocated dynamically. > > > > In addition, remove the CRYPTO_ALG_ALLOCATES_MEMORY flag from both aead > > and skcipher alg structures. > > > > There is nothing that says that algorithms can ignore > !CRYPTO_ALG_ALLOCATES_MEMORY if there are too many scatterlist entries. See the > comment above the definition of CRYPTO_ALG_ALLOCATES_MEMORY. > > If you need to introduce this constraint, then you will need to audit the users > of !CRYPTO_ALG_ALLOCATES_MEMORY to verify that none of them are issuing requests > that violate this constraint, then add this to the documentation comment for > CRYPTO_ALG_ALLOCATES_MEMORY. Belatedly... Adding to this thread my colleague Lucas who did an audit of the users of !CRYPTO_ALG_ALLOCATES_MEMORY to understand if we can add a constraint to the definition of CRYPTO_ALG_ALLOCATES_MEMORY. Regards, -- Giovanni