Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp715499ybt; Fri, 26 Jun 2020 09:48:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW4VjYubKU1TvnkTnD/eYaErNreokmtewEDIgu+qGIPYWcyAl/I2c9GNOHJdFRK9NRFWxM X-Received: by 2002:a50:f694:: with SMTP id d20mr4048655edn.171.1593190084323; Fri, 26 Jun 2020 09:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593190084; cv=none; d=google.com; s=arc-20160816; b=LBDKv40kNoGhSLT1K6CGHQcuaBY8fRTL1SaUKVkDOpUT2NhqyF1MKsPwRBAN1lgM/n ZgLXOwFHe0BzBsco3mhwmYDNXMZsoCMlduWQJsBV0YP7MharK1prFT33pwO4T8o10xur eHyF0CEBnVNki43rF8VUHBxJd8Jf22EGtX7vdYaB4ayghFlAX1qJmwFxhuCVJ2kgEHq3 ARczHIbtLCf9rMq1NCWcVvaDBQZ/DwH2KLGGkMfRMedYO1FFXFDd/RsBR8VEASfyt7Op RlIAgOJG27VstRk57OwqR3nOM12EaKfeNT5pLKa6F8x/mlRB/evMvPx96OKO/DgEm+u3 45hg== 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=KhyzVywFi03LMkGFE6YU3ix+rjL9u5JtHjzF89C3iwg=; b=r8wYV3LZGa+0keOMiMTmEM0VliN6CpA8O1r5+XpMgv4erwCLMrxoGRTiYDhOBULPgL jwGTo3ZGj0eTiiTsgZhN1ceuzyOBTItCnAzXqVjZzsVs2eMYaWrZ47f/HAzxPc4W25Dg aZxlY1P7dOwcJZNkuLmUTC7AmHMWSqorDvLom1fOht5ploLLe7sjMEZLrOooNta6fYap MOQV/XduXMKGsCezkcU71D+hfXdpdt5z3pNxX0Xx5c5THczhXXH0dRp2qVzCMpvn1sMW 9ob5/eD7GzXCgvZJvGJcAwKYkbty4pv6gMIq2MR2stOsSyJPOFwN1prxc5JzANnTXcbk jrFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QHSRrY0d; 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 c11si19929038edn.383.2020.06.26.09.47.31; Fri, 26 Jun 2020 09:48:04 -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=QHSRrY0d; 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 S1729393AbgFZPSN (ORCPT + 99 others); Fri, 26 Jun 2020 11:18:13 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:52988 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726878AbgFZPSM (ORCPT ); Fri, 26 Jun 2020 11:18:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593184691; 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=KhyzVywFi03LMkGFE6YU3ix+rjL9u5JtHjzF89C3iwg=; b=QHSRrY0dIfJbA3UqF3cyR6vr1rgEMinv/gy5UCNg4gF7UcTdP1mGsCnFhHBgIZWODI5dn5 OLzjRSlmhAszCVjrvFDd3Y88pkfPoN7jaq3h+FshycLfOBEYkyfVZ0Z/bqG4IZxvGQXFtv IHAhH4c78Wiee9tvkhPpvWujX7c5zxc= 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-185-BpksQRLTM9a38lmnoLB9TQ-1; Fri, 26 Jun 2020 11:18:04 -0400 X-MC-Unique: BpksQRLTM9a38lmnoLB9TQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9775418FE866; Fri, 26 Jun 2020 15:18:02 +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 814FC5C557; Fri, 26 Jun 2020 15:17:58 +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 05QFHwaF013492; Fri, 26 Jun 2020 11:17:58 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 05QFHuir013488; Fri, 26 Jun 2020 11:17:56 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 26 Jun 2020 11:17:56 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Herbert Xu cc: Eric Biggers , Mike Snitzer , linux-kernel@vger.kernel.org, dm-devel@redhat.com, linux-crypto@vger.kernel.org, "David S. Miller" , Milan Broz , Jonathan Cameron , George Cherian , Wei Xu , Zaibo Xu Subject: Re: [PATCH 1/3] crypto: pass the flag CRYPTO_ALG_ALLOCATES_MEMORY In-Reply-To: <20200626044534.GA2870@gondor.apana.org.au> Message-ID: References: <20200610010450.GA6449@gondor.apana.org.au> <20200610121106.GA23137@gondor.apana.org.au> <20200616173620.GA207319@gmail.com> <20200626044534.GA2870@gondor.apana.org.au> 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.79 on 10.5.11.16 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 26 Jun 2020, Herbert Xu wrote: > On Wed, Jun 17, 2020 at 11:09:28AM -0400, Mikulas Patocka wrote: > > > > Index: linux-2.6/include/linux/crypto.h > > =================================================================== > > --- linux-2.6.orig/include/linux/crypto.h > > +++ linux-2.6/include/linux/crypto.h > > @@ -97,9 +97,18 @@ > > #define CRYPTO_ALG_OPTIONAL_KEY 0x00004000 > > > > /* > > + * The driver may allocate memory during request processing, so it shouldn't be > > + * used in cases where memory allocation failures aren't acceptable, such as > > + * during block device encryption. > > + */ > > +#define CRYPTO_ALG_ALLOCATES_MEMORY 0x00008000 > > + > > +/* > > * Don't trigger module loading > > */ > > -#define CRYPTO_NOLOAD 0x00008000 > > +#define CRYPTO_NOLOAD 0x00010000 > > + > > +#define CRYPTO_ALG_INHERITED_FLAGS (CRYPTO_ALG_ASYNC | CRYPTO_ALG_ALLOCATES_MEMORY) > > Any reason why you need to renumber NOLOAD? If not please keep > the existing values. There is no hard reason for that. CRYPTO_NOLOAD is a "virtual" flag that could be only present in crypto algorithm requests and I thought that the intention was that the virtual flags go after real flags. If you don't want to change existing flags, there is no problem with that. Mikulas > Thanks, > -- > Email: Herbert Xu > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt >