Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2482829ybg; Fri, 31 Jul 2020 00:27:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzud7USCwnEAlTzFvosokbu/bmoyG301L3z1RJKk2ae1RCJf48usp1u57CuMdCWMOW+cbHq X-Received: by 2002:a17:906:1f88:: with SMTP id t8mr2662138ejr.241.1596180444033; Fri, 31 Jul 2020 00:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596180444; cv=none; d=google.com; s=arc-20160816; b=fLeHqx+BWf6wFepyfKAEzumtuYZpNd+ShiAjuN47bu3XneAUloKn/j6WGB7gK/sbQC C64Qnp7C7kYqAQbu8bVNlzdbTLjyUWGg/BXZRURkdac6OjS0DkGJ54AaQwHaRFPG0LiA 3MPQDWfEEku4/Nm7+DgeACcEMFCyomwP6D5Bz2TyV+6sDX00XHsQe9SYuYFYMp0fpWHC HEgPHe9PwNjFBcAuh7gF3vwYvZUMDX/hTY0+Ro32hDhY2vLpwjgjTYHQaYKfw1+8iHbz qcQSvk00SlltjU8tQFlLwUJ/vvRSAqZeWN1BAkZByhqsiS2XOqobku4INfGQbQh2Xc99 5WdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date; bh=0YnkVrlrAiVS/o1w1HOlfxnNjoj1cmkJmI7oYTXV8zk=; b=TaaY2QNQ9zuMN96h5VxwJDXDyURAV1AiEj4taQaSLdWGPG5K00ypS0nKqaPiR+Kbz7 FR6swq0eqpjxmzDGCMkf9QmFiO2ZVai/9n2j22xTL9Efq129/5IgHKi5LaPSI1JSGLtM E8WC80nf4xhVeuyIoBS0w5dR6VDleHt/PE8GZ84CvyhOYOnhZxyJPtEde4Jzt3snfUoe D0cgc8VJEpNBAzcCLtmonDjnK8rNF5DygXF0CIT9vjxmyaVlWCwx9Ki9AJFmhxr7WKRC hPHvODu69D3xH8lmiU8eazlR78oexv52ZkGTrHNYefT4HiulCui391v9z/YRCxsNIWh4 Mc+w== 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 k6si4755462edn.299.2020.07.31.00.26.59; Fri, 31 Jul 2020 00:27:24 -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 S1731557AbgGaH05 (ORCPT + 99 others); Fri, 31 Jul 2020 03:26:57 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:39886 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731419AbgGaH05 (ORCPT ); Fri, 31 Jul 2020 03:26:57 -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 1k1PRO-0001Iv-9s; Fri, 31 Jul 2020 17:26:55 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 31 Jul 2020 17:26:54 +1000 Date: Fri, 31 Jul 2020 17:26:54 +1000 From: Herbert Xu To: Eric Biggers Cc: lenaptr@google.com, linux-crypto@vger.kernel.org, ardb@kernel.org Subject: Re: [PATCH 1/1] crypto: af_alg - add extra parameters for DRBG interface Message-ID: <20200731072654.GA17312@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200713172511.GB722906@gmail.com> X-Newsgroups: apana.lists.os.linux.cryptoapi User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Eric Biggers wrote: > > lock_sock() would solve the former. I'm not sure what should be done about > rng_recvmsg(). It apparently relies on the crypto_rng doing its own locking, > but maybe it should just use lock_sock() too. The lock_sock is only needed if you're doing testing. What I'd prefer is to have a completely different code-path for testing. How about you fork the code in rng_accept_parent so that you have a separate proto_ops for the test path that is used only if setentropy has been called? That way all of this code could magically go away if the CONFIG option wasn't set. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt