Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp974220pxk; Thu, 17 Sep 2020 23:45:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYDtADIOFoV95Cqd3detmnuwx4K1hMYBSJczipuz33qimhYj3Vnlvrar7+Y/ph06TRwRBH X-Received: by 2002:a50:9fa1:: with SMTP id c30mr36111104edf.207.1600411500815; Thu, 17 Sep 2020 23:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600411500; cv=none; d=google.com; s=arc-20160816; b=zAW9GDcK70GmyIgVS8426IjIcobm6MwGV84l9NmIN8sOwMKJHV1/dCXyjYtlU7z2Vn +Qk0PoPVlkt45y34ObqCihzQJaY+//PqzpFKZhHkpioXZXK2d6Z22ZCT35t5MiEGQx7E UezRzISroxvU3dByI/toT3eW0Ib1JdOR2uCIVwU6ycV1Bawindw5eanbuU1nFepfHXNh ACiy3KOU6WF32Usc83ZmtnVH6X9bnG7713bflfj/WJ6TxHhIXRo8jZD0b10jt8n7LARU VixoTk6Ksp8FSE97TBYWgfX2luPXdt1lTRu0hwt5W1FWB3+K++4CcUIv5EY0tAV7Bowc mUAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Xu5b4RNig0JJET2fneSg4ihrXnYwAkN3bpRWssPAAgE=; b=0Ot5sAqVXoZVJw2Er4q0Ajvk7qlPJDXAVQzcIx9C/6xjxd4Dkev9fBbbSG8OWJHoE3 dZ9pfLgjtzfkhl7+D81/h08dhcjghzn+aBKDf3LS3YVSSac50f1c5jb+jZldKFIEFfld zxn+MLdz70yzwV4K/w88C5PCgn5FaoJpkhjjlz7n2qxswNKneyRf/e0VD+kjBCH+h0Cv QTlXPjKfh9cxvnDrfafkbbGdOjmJc2hQJPtENdplUI1v/8Pn0jihApXRRbwK+u4mlH+O UCoYWmlqXnEL662Lw6v+w4H75YjLNbaRoapdheuhxHtzqK28o6btDOIIrZJRNtxB62gU 2kcA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x23si1542879ejj.642.2020.09.17.23.44.26; Thu, 17 Sep 2020 23:45:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726353AbgIRGny (ORCPT + 99 others); Fri, 18 Sep 2020 02:43:54 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:57426 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbgIRGny (ORCPT ); Fri, 18 Sep 2020 02:43:54 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1kJA7Y-0002Sf-Mv; Fri, 18 Sep 2020 16:43:49 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 18 Sep 2020 16:43:48 +1000 Date: Fri, 18 Sep 2020 16:43:48 +1000 From: Herbert Xu To: Elena Petrova Cc: linux-crypto@vger.kernel.org, Eric Biggers , Stephan =?iso-8859-1?Q?M=FCller?= , Ard Biesheuvel , Jeffrey Vander Stoep , Eric Biggers Subject: Re: [PATCH v8] crypto: af_alg - add extra parameters for DRBG interface Message-ID: <20200918064348.GA9479@gondor.apana.org.au> References: <20200909210017.GA1080156@gmail.com> <20200916110731.598437-1-lenaptr@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916110731.598437-1-lenaptr@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Sep 16, 2020 at 12:07:31PM +0100, Elena Petrova wrote: > > @@ -148,20 +260,58 @@ static int rng_accept_parent(void *private, struct sock *sk) > * state of the RNG. > */ > > - ctx->drng = private; > + ctx->drng = pctx->drng; > ask->private = ctx; > sk->sk_destruct = rng_sock_destruct; > > + /* > + * Non NULL pctx->entropy means that CAVP test has been initiated on > + * this socket, replace proto_ops algif_rng_ops with algif_rng_test_ops. > + */ > + if (pctx->entropy) > + sk->sk_socket->ops = &algif_rng_test_ops; > + Please make that if (IS_ENABLED(CONFIG_CRYPTO_USER_API_RNG_CAVP) && pctx->entropy) so that this and the rest of the new code simply disappears when the Kconfig option is off. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt