Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2992383ybt; Mon, 29 Jun 2020 12:18:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYAokOEqrDAHQgCQf2+oyFaKj38mHq1aMBoyTBZUOS7um+KqFTQfTChctSNMtDF5kaQw4l X-Received: by 2002:a50:ee01:: with SMTP id g1mr12064401eds.264.1593458338140; Mon, 29 Jun 2020 12:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593458338; cv=none; d=google.com; s=arc-20160816; b=k3lgHtby3MYF58AFFoXu8PGW81S05SkQRmjVNrmnQoBtx+WqHR/mha90pZNO0Gv3OS qu/hlXs8RaE+IIZJpYR9q19tvtYmvR9JM+CkjTEssZ7miTXQIC6hyZ6gmfOiaSu+XBcg Qk82KeyI0GUP1eDqF3ZCxcSrdhSsFad5qHYJJmbWOQElOV9T6tHuhmZz4u9siLldN4v0 FOlkNBifn9GkeQS91X55humjtvjeVFdMfPmmxDajgvqXfzbf/1oUDnm+vSx2npziAmDX 1pKCJA80yGPHqGFg5CERkQ+rk7+QzTBp5iNdIDbmDP//2YrFAdrH1g1oBP80UhU4Ponx ylDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=C+A60OaYSKQfoFPbCowvu2GaNu7uEQw80AdN699By4g=; b=bx71VCNH5khCgpHWZTW4oKkAm1WonvtMVJPfLNU8r+Pnm+2q6YYl5CHyC8XkKTiAeP jT9WGeIykHwxYeeIllXgjP2zgioH68PbShGQJi4TtuCBNjIQKeRFsYFL15KhNinq1/i0 BiBmtrLO7KMm0kA/JyvYv4h4eTZG8xPEK8qsYac6A/K41Vz+KdNgDcAss/81nL+F7Yb8 AFTz5MXbMyKfjJ9qfh0rn1/8Ds9bqFaabht1mGlnVv5LmDm07iHuAa6O8b3umEnimXSl oH501UnIGBSdA/twBmZoiXfZfac4+0Fj3DcJ93phBLiyYizK7BU+ZeaZl5gpAEGO3gpc Qfcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JW1oBc1w; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si280314ejr.733.2020.06.29.12.18.31; Mon, 29 Jun 2020 12:18:58 -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=@redhat.com header.s=mimecast20190719 header.b=JW1oBc1w; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732020AbgF2TSZ (ORCPT + 99 others); Mon, 29 Jun 2020 15:18:25 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46242 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732016AbgF2TSY (ORCPT ); Mon, 29 Jun 2020 15:18:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593458302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=C+A60OaYSKQfoFPbCowvu2GaNu7uEQw80AdN699By4g=; b=JW1oBc1wFcVC+uf1flpa+W22pyWP04j2WVCtRQp8y8PXlJ7dZKE2IYW9VtXUI+S6ITmeq0 3H3m9v23sl0+ZhUzDEXqNla+MKOwUzo6BVJ/4D2d/qClBlMrcdK5egQOnxOLqieBcAzWxv 7EIYjmqo1ZgmebG0xeAX2UlgjiajXqs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-454-R5iFLdihOc-M61CgFCZKcg-1; Mon, 29 Jun 2020 09:17:15 -0400 X-MC-Unique: R5iFLdihOc-M61CgFCZKcg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3640518FF662; Mon, 29 Jun 2020 13:17:14 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 062BD2B47C; Mon, 29 Jun 2020 13:17:09 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 05TDH9li012066; Mon, 29 Jun 2020 09:17:09 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 05TDH8JV012062; Mon, 29 Jun 2020 09:17:08 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Mon, 29 Jun 2020 09:17:08 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Eric Biggers 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 In-Reply-To: <20200628200022.GE11197@sol.localdomain> Message-ID: References: <20200616173620.GA207319@gmail.com> <20200626044534.GA2870@gondor.apana.org.au> <20200626164617.GA211634@gmail.com> <20200626170039.GB211634@gmail.com> <20200628200022.GE11197@sol.localdomain> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sun, 28 Jun 2020, Eric Biggers wrote: > 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 This was some misunderstanding. You said "cryptd_create_skcipher ... is missing both setting the mask and inheriting the flags.", so I understood it so that it should inherit CRYPTO_ALG_INHERITED_FLAGS and set CRYPTO_ALG_ALLOCATES_MEMORY unconditionally. Mikulas