Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2251631ybt; Sun, 28 Jun 2020 13:00:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEzNbRVN7ps0+j3Xhl0cbFH+Sk/TGzTQultSVuHQBPKH6Yh3R3ecO07qDcigAFpSJ/WJm1 X-Received: by 2002:a17:906:97cb:: with SMTP id ef11mr11283676ejb.69.1593374451180; Sun, 28 Jun 2020 13:00:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593374451; cv=none; d=google.com; s=arc-20160816; b=TFfZp//l0R5sSiau6v+237FfOsmp97IjDx/z+Gx7xClwIDU/Q5DGxk9kzroOZt9yK7 gGGeNwQ8mS36hA5jjB7jchT40jsl2rxicgF0lbi5G/OOlDQNLkH/kyQouiQLnygygMnI Q/k8d9ZOu/2Fu+tTt6L3p2txb0FHmR6jLBl5Cp6S4v4iLp1A8Vxen1sphdOf7S9U+ogL zoVohUzY9lbNtJSFgk8nrIZkTmK8wJ0cTuY562ZWzlrGwkv2aNxyJT2+fgrIZTon0Ic1 BlIAE+vQ/iEmumUNkv8+doV/fgafoqY2j1zBREKMzZL6F2Aisodb96dCnhEAWOmI85Yo JTAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HEvu6IPQ4rMxAs9p4zZ+T8gOlEOcDByGfXVkCs6CXlU=; b=MxsEU6/dgRNCBPmZE7tGoUs6vI5ZXJdU0NKwMpcnZNhUDzMXhz6QYn4cgDt3Kw9QSt OQtTqCoBhjwqx36vlkzUpM7vgaAOkkfG0L9HHcq988RliS4/purkafDvZYPVBIPVlqdw CDCGmWqKIKSX6CiVYFxxrN8KjJ8WHfSMcQBGx9VeHUjpTHYoxyV4gysQeqtbDpXbo62v o1Em2E45naRdF4DIM0AepuiRpzJFVfqoJT7cneYDrH6PKRUCI3F3f7D43K/pEK1ZcrYS wv8JJFUvk0OnoPkJvonwsSoaufqNA1S3b0bUOym9TKdZ5MZL0+TdJnUWd7Ob/F1i7vWD y3+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QUMvF0tU; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm7si14964663edb.43.2020.06.28.13.00.26; Sun, 28 Jun 2020 13:00:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QUMvF0tU; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 S1726699AbgF1UAY (ORCPT + 99 others); Sun, 28 Jun 2020 16:00:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726675AbgF1UAY (ORCPT ); Sun, 28 Jun 2020 16:00:24 -0400 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C7C85206C3; Sun, 28 Jun 2020 20:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593374424; bh=VVxMX2lDV09g2mF+EVY4UZ5ddjynnYgTOdUT9eAi10I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QUMvF0tURaxVQa9M353t/xbidOoVXPl6CjgsU6D5iLImfp0x89UQmOYQzZ0Zgstl0 H9URve8x7WBzNjbVCz1wqWMWKAkNbX2HzaQgJ60pni/5OabVf+Wb12gNf3EGAeBRnT YAAO6JSCqEW9HqrHYt/f4zZTRZxE5x+7yuwrPuPk= Date: Sun, 28 Jun 2020 13:00:22 -0700 From: Eric Biggers To: Mikulas Patocka Cc: Mike Snitzer , Herbert Xu , Zaibo Xu , linux-kernel@vger.kernel.org, Wei Xu , dm-devel@redhat.com, George Cherian , linux-crypto@vger.kernel.org, Jonathan Cameron , "David S. Miller" , Milan Broz Subject: Re: [dm-devel] [PATCH 1/3 v2] crypto: introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY Message-ID: <20200628200022.GE11197@sol.localdomain> References: <20200616173620.GA207319@gmail.com> <20200626044534.GA2870@gondor.apana.org.au> <20200626164617.GA211634@gmail.com> <20200626170039.GB211634@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sun, Jun 28, 2020 at 03:07:49PM -0400, Mikulas Patocka wrote: > > > > cryptd_create_skcipher(), cryptd_create_hash(), cryptd_create_aead(), and > > crypto_rfc4309_create() are also missing setting the mask. > > > > pcrypt_create_aead() is missing both setting the mask and inheriting the flags. > > I added CRYPTO_ALG_ALLOCATES_MEMORY there. I don't see where the cryptd request processing functions allocate memory. It seems that cryptd should just inherit the flag, like most other templates. Likewise for pcrypt. And also likewise for rfc4309. Where are you seeing the memory allocations that would require CRYPTO_ALG_ALLOCATES_MEMORY to always be enabled for these? - Eric