Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3494077pxb; Sun, 20 Feb 2022 22:12:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBUGRnO6mIahwD0i2CEXPLapOwqE2QJOU9uBHeSBcKYLea8pLY/vrWePVPKpw4yFKjhB9N X-Received: by 2002:a63:6a89:0:b0:362:8755:4210 with SMTP id f131-20020a636a89000000b0036287554210mr14945708pgc.607.1645423976121; Sun, 20 Feb 2022 22:12:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645423976; cv=none; d=google.com; s=arc-20160816; b=Q5vpMgKi/vcDlBLdzzJNa32aQhyr9EJsFM5xZFbLXhM+9YAg3MiMvIFWSzmgVenSt3 uP6fg1BDmHc9OUTQNt92iaOHPVrFZOkeeN40uQsCeJOZOaGozy1732OoYOaiLjZOO1CF BrrKbvDG/U4QlOliiw0l3WqeLOagmwH8IHtGWap2xLxoQWxPlza8O1aCvv8YCbaszpjv ZNsnLptt9FQj5hRIaUznxQoKht0lp0022sboUdRDfh3wafziuZcFfzCVjLG65bqRFkYJ gwcv8HYjYtIFeBTtYqWJGof+18fbHYxybiL2B7+YPOp1VIy2tRy+IqOmlgr9hUUIAMBA q56Q== 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:dkim-signature; bh=pc3cIADf+YN+DD6PBHIrlwDc3N/pBaEJjD/6Ytu8oO0=; b=vu876KSJxkiCMJOthMAUbwmti3HUXgH/sI6KA5QuHKU8wbltjGRhlomLPw3W/oPs/k jYX3FxPVp9wwXb68eQWFpYyNK6KEsc/LGBxA/S9D9s+uzd8NGApGbIgrb7owxAcExmTa 10U9HXyPheb/xOvkA9Lt0r512iRyzZBgCmudalijFGwnJWWxy9n7DIYhmS4+bc05lW8L 2BkcHVG6fevIW5L63KFTTH5X0kQZBvxjOH3cVAOR64tl0CRCQnGORTvvcebojJNxRQyb CFbipzllM0sGYXQgQZHozilqF8/GgogK7pDcSh6eyWD+uiLolQjLRb96pByJNx3LTDOV u8tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vCbVG1Zf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o27si1438452pgm.533.2022.02.20.22.12.40; Sun, 20 Feb 2022 22:12:56 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vCbVG1Zf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242235AbiBUFOJ (ORCPT + 99 others); Mon, 21 Feb 2022 00:14:09 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238149AbiBUFOI (ORCPT ); Mon, 21 Feb 2022 00:14:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D3C4517F0 for ; Sun, 20 Feb 2022 21:13:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DCAC4B80E6D for ; Mon, 21 Feb 2022 05:13:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84771C340E9; Mon, 21 Feb 2022 05:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645420423; bh=+WeLnu5fHua72Z+d4lcg2Aa1sDENF8awmj+7szhLfG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vCbVG1ZfJGmsP9PGGFjR+GyDHh+4LRsRm1f77S8yuBAysnxuGsZC7mF7eNzFERizQ erCfxPaTvyb6hHivyaCa6SD1NPDjcEXJFc6TiIik034orGik1fWvR5zJrkmdWQyLRw B0bSUhXc9SWsgWeyLzTn+VEpwwqbNHl9Pyh6UAfX3W9SLAGHrdru/B+LzAnSVpZUHp F0/xfkdAM48Ql8Oplui0AhuAYRwJAfj3ecplyt+WlV8Hf72fxszSs2wLZ1TApyQHRM oHbmiLR9CVlgRNfZVtP4abwc7YayvFm4tK6knWXP0wqfElhI3fqnNCbIj8iToVKn3S b20APckH338yw== Date: Sun, 20 Feb 2022 21:13:42 -0800 From: Eric Biggers To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, linux@dominikbrodowski.net, Theodore Ts'o Subject: Re: [PATCH v2 07/10] random: group entropy collection functions Message-ID: References: <20220212122318.623435-1-Jason@zx2c4.com> <20220212122318.623435-8-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220212122318.623435-8-Jason@zx2c4.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 On Sat, Feb 12, 2022 at 01:23:15PM +0100, Jason A. Donenfeld wrote: > +/********************************************************************** > + * > + * Entropy collection routines. > + * > + * The following exported functions are used for pushing entropy into > + * the above entropy accumulation routines: > + * > + * void add_device_randomness(const void *buf, size_t size); > + * void add_input_randomness(unsigned int type, unsigned int code, > + * unsigned int value); > + * void add_interrupt_randomness(int irq); > + * void add_disk_randomness(struct gendisk *disk); > + * void add_hwgenerator_randomness(const void *buffer, size_t count, > + * size_t entropy); > + * void add_bootloader_randomness(const void *buf, size_t size); > + * > + * add_device_randomness() adds data to the input pool that > + * is likely to differ between two devices (or possibly even per boot). > + * This would be things like MAC addresses or serial numbers, or the > + * read-out of the RTC. This does *not* credit any actual entropy to > + * the pool, but it initializes the pool to different values for devices > + * that might otherwise be identical and have very little entropy > + * available to them (particularly common in the embedded world). Perhaps this comment should match the order in which these functions are defined in the file? - Eric