Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5586046pxb; Mon, 14 Feb 2022 02:43:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSJ0prXBxBPDMb8ZaB8ZuKtP9oEr33zUkB2qNe6iJk+BkvV0KyNA39YwcmCx6m4qmaVO4f X-Received: by 2002:a63:ed17:: with SMTP id d23mr11013696pgi.543.1644835395130; Mon, 14 Feb 2022 02:43:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644835395; cv=none; d=google.com; s=arc-20160816; b=FLISXWMkTV44lSAiybdkN2E6czLPcNwa37CsSJSiVjQj+JYCttJ5ertMZYTzOEx2IW 9gT0l+gQOqStxDUwXCykOvXC+ufXf2quGfL5j8ureDtbtbPAQFjdS4koR1VF77B+4fv0 7CYULE3//C8grnVKP+XCaR5rW1KJkEB/Kbo155fn6YZsOheMSzY3LUl4WRo7Wbcb6pQx qDyDbeK4KW21vo9/5nVNNWSZJ95JlXRJSYktadwvMFFxJi49NaoPD7AMQPFdPCTD0gFm GD9orNQvxO4wrS6adXLVtJR693eOsnRWZvsOVlyr67ncmaOxfL+daWnNXkGlNMAtwAvU +h8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wa1MsV/MrJ4rTwneOYKSspm1LJbH6bU8GkSymOfYCkM=; b=LowX4mTP1dmlXhuX9c0htxbKoaIRtn/csMc6CxajvU+xZcIyFkg46rVfgLOS0GEGNu ud6uTDWlpeWxVDHsAkGWdPhQvwMX+64uVLYyd0T7WrfWCwLJwbwJbbSq0GPRURxFX3Rt MFShJmLPmQch5otdOuYDnaDUJVK8wNHCFckHG7TmCXsgT2MWZMXzKA8aOLWW74msiRCA FNKO1M5n8LUXwnm+m2c5RvcTIP4ESHxWwK2SdJGd/ucViM7M7tTPe2SlPtTq8PsFXieK 92iXPn/Ah/pWtc+1SVEh/S/z8LKQgU8Juu8Oo1VhIf8QyrFe1YXDGPtov9wUwIrGV4F8 ezwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11si13446589plg.35.2022.02.14.02.43.00; Mon, 14 Feb 2022 02:43:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234195AbiBMG52 (ORCPT + 99 others); Sun, 13 Feb 2022 01:57:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234043AbiBMG5K (ORCPT ); Sun, 13 Feb 2022 01:57:10 -0500 Received: from isilmar-4.linta.de (isilmar-4.linta.de [136.243.71.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 861B45DE65 for ; Sat, 12 Feb 2022 22:57:05 -0800 (PST) X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES Received: from owl.dominikbrodowski.net (owl.brodo.linta [10.2.0.111]) by isilmar-4.linta.de (Postfix) with ESMTPSA id 246FC201417; Sun, 13 Feb 2022 06:57:00 +0000 (UTC) Received: by owl.dominikbrodowski.net (Postfix, from userid 1000) id 707DF80871; Sun, 13 Feb 2022 07:54:07 +0100 (CET) Date: Sun, 13 Feb 2022 07:54:07 +0100 From: Dominik Brodowski To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, Theodore Ts'o Subject: Re: [PATCH v2 04/10] random: group initialization wait functions Message-ID: References: <20220212122318.623435-1-Jason@zx2c4.com> <20220212122318.623435-5-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220212122318.623435-5-Jason@zx2c4.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +/* > + * Returns whether or not the urandom pool has been seeded and thus guaranteed > + * to supply cryptographically secure random numbers. This applies to: the > + * /dev/urandom device, the get_random_bytes function, and the get_random_{u32, > + * ,u64,int,long} family of functions. > + * > + * Returns: true if the urandom pool has been seeded. > + * false if the urandom pool has not been seeded. I think this comment should be updated, as there is no "urandom pool"; instead we should refer to the "random pool" or the "random base pool". > +/* > + * Wait for the urandom pool to be seeded and thus guaranteed to supply > + * cryptographically secure random numbers. This applies to: the /dev/urandom > + * device, the get_random_bytes function, and the get_random_{u32,u64,int,long} > + * family of functions. Using any of these functions without first calling > + * this function forfeits the guarantee of security. > + * > + * Returns: 0 if the urandom pool has been seeded. > + * -ERESTARTSYS if the function was interrupted by a signal. Same here. > +/* > + * Add a callback function that will be invoked when the nonblocking > + * pool is initialised. Same here ("nonblocking pool"). Other than that, looks fine. Thanks, Dominik