Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2128864pxa; Mon, 3 Aug 2020 08:10:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMRx6rLLSDkLlxqxKHM8kf/1pD8LDD71nMqlezmfgeUWwzqXxtyAGO8WijANhiSoWeqsZ3 X-Received: by 2002:a17:906:228a:: with SMTP id p10mr16756424eja.23.1596467442408; Mon, 03 Aug 2020 08:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596467442; cv=none; d=google.com; s=arc-20160816; b=Szv7e3ILfLSZ9ccH8n3mimj6GVdKfKlnv/eNkFPuaU4WgcjeONdu7PBpx/VtktaJzx JiNfd0xp5PazyNwhapby9b0RXdWvMKXHBKK9hPx47M+MRWp02+DHpq0b63eNXeq+79fC NQ+ajoX0AW/g17jnWBi1dvt2oXBlKhN/9pPDrQtxgx8ngURpJeNGwS/PfVevBkmusg1B Jrx9jsJ8rAhT3ZY1JN/Ge3SmpFfuYv19y9uB1Jzw5BdfNxSznPikzAcpLLAsECtj2d0j isjVkm8uiNLH/EEN3Ddb3yuYuQTBCNURERhHR/CIIm4mHuKHiNBwAW+H5ribIs5Nh0Ig fk2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9gVOvKOEzWL/0OOHvsxWHzzMdk8kO5gegmDOzKRPDeY=; b=MDOryBeWVLYMHndfAXiCrnYQQFPWJuBIIQzuIZpKN2TADOngBaJAMtmiu0fESWWK2k 0Qe+WhPT9wAfiOscrYxQUGvv1PHuHrJpRzi1FrdlWSR7xzcHpJc0LYhZzAVOY1YNJBBq 8VEC6eIsSIAxPf87fsjGEBjneYcIcDtUtusvn6uOh8lKyK5IjjfBU9O6Gw6K1jPbuBRZ b2byX02hwVfkeHhiqqMjN6pFhfY8ddUD0Warjwzf581c1IhK1G2+6A9x64/Eh+Mv5qLS P5wDj/GHP7S7UNDmQO5zfVQUcOi1wR/7uR9nuJScKrrmC8GM4FZJVFkgPj21aNjR/Zps qg1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=mbF0GFL4; 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 k17si10513267ejz.217.2020.08.03.08.10.13; Mon, 03 Aug 2020 08:10:42 -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=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=mbF0GFL4; 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 S1726356AbgHCPKL (ORCPT + 99 others); Mon, 3 Aug 2020 11:10:11 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.21]:24228 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbgHCPKL (ORCPT ); Mon, 3 Aug 2020 11:10:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1596467409; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=9gVOvKOEzWL/0OOHvsxWHzzMdk8kO5gegmDOzKRPDeY=; b=mbF0GFL43sqv0E95W2jUXukGKNZXrpAAiQRBKNxEzz5TbyR/G+E2N4XDAWgMCKOG4r zCZ0L9s3DqIR5mS/eLBuyHcEkVs9nY8jni/Iq/NQCfpNhp4E2lLCIKgnOeXjkerU7MlL XKR3lp7YKXcH0A9oWteLvsgnLS5nsZgFXGAkUcgoViIvIvk292Z3QvoRNinz8XFBPQyr TE8u7V4i6C0VGng00YlveRox13hQtAa8N/WeY1TILZVGbvOl+j2yk2SgYNRdIpzPJ8rC kHr38NCGAjE4R7y5r7BbPUkk2btFFYnoyvS5LJXPiWemv1E8IJ2K3oelceAUTediLMk/ hTYQ== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9xmwdNnzGHXPZJPSfIqEh" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id y0546bw73FA4f9t (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 3 Aug 2020 17:10:04 +0200 (CEST) From: Stephan Mueller To: Herbert Xu , Elena Petrova Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Eric Biggers , Ard Biesheuvel , Jeffrey Vander Stoep Subject: Re: [PATCH v4] crypto: af_alg - add extra parameters for DRBG interface Date: Mon, 03 Aug 2020 17:10:03 +0200 Message-ID: <4818892.iTQEcLzFEP@tauon.chronox.de> In-Reply-To: References: <20200729154501.2461888-1-lenaptr@google.com> <20200731072338.GA17285@gondor.apana.org.au> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Am Montag, 3. August 2020, 16:48:02 CEST schrieb Elena Petrova: Hi Elena, > On Fri, 31 Jul 2020 at 08:27, Herbert Xu wrote: > > 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. > > sendmsg is used for "Additional Data" input, and unlike entropy, it > could be useful outside of testing. But if you confirm it's not > useful, then yes, I can decouple the testing parts. Nobody has requested it for now - so why not only compiling it when the DRBG test config value is set? If for some reason there is a request to allow setting the additional data from user space, we may simply take the ifdef away. My approach is to have only interfaces into the kernel that are truly requested and needed. Ciao Stephan