Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4478682pxb; Sat, 12 Feb 2022 06:34:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJypooD/NX5O1E3nEEsqrpht5X2Wmio/fUxss9xgQowj9s/VVJKwgy+yl6tObmTwiEanZCbh X-Received: by 2002:a17:907:3f14:: with SMTP id hq20mr5181077ejc.68.1644676497871; Sat, 12 Feb 2022 06:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644676497; cv=none; d=google.com; s=arc-20160816; b=M/oCpNSh/M2qFIe7I29YL7iii9xesE8SzOidmGJvtKoscb/uL4nSM5MhEETTx/AZKc dtDMAcPXWEeysz11w75rZBfkbzhS7gjLbomY9TU/MFkUzQD2NOIdiuB0iws+66N1bI/9 YvqHv8J2Yg+YHCywbngusPd5Q5vYsWZohMjECJzYeyS7OhqEYt0M/+je5DcOIpzsvd09 t3gLPQDK1HcXaactX52yxQzdK7yQ8PcivI7m+3PaZ0WcpIxQpFD7aa31OX4s6iGgqxBk Z1899hizqAYLQyD8i2Q479fN4qwNqWCJB5FHHTgS+EUR8fskf7IA8paz82/QQ8EIC8Nc 01Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Edu78Slk3keL46bYXPo4PPqvMk1tMqWFnH0+9/7BiN8=; b=lvoK4vWfbP4KQDIwnqyd4pqOp18uQ2DLAkys9B0MeGAMfVlZbvZAltZUgOUga+Enqn xCsQox570LysSh24kAH52a19XH5Q3Sd3bxBidXitnm0vsjlQGB4B+n/8RYPvAx8TGhm1 I+Ik9LeYjpaCBL1KDtFdfg3uCHfIMwWCkm8rB/WS0p7KByJIuKBrIhu3AuXs8niYOUdc tykPGjHX7K3wgcY44vez+eQFnokNB6Jw1pq5Z/c5QzbxFhvMkVYH75uMp6upjEoYGpZr y6QSPMNco4g23IZdjRjTcHFuYg2H4jZgDc5YnUnXxbnTSjYwaUpFu8dDQiLqXrY5obIR qCWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=ZmgvObLo; 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=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2si19581485edd.151.2022.02.12.06.34.25; Sat, 12 Feb 2022 06:34:57 -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=@zx2c4.com header.s=20210105 header.b=ZmgvObLo; 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=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234747AbiBLMXd (ORCPT + 99 others); Sat, 12 Feb 2022 07:23:33 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiBLMXb (ORCPT ); Sat, 12 Feb 2022 07:23:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B940A24BE5 for ; Sat, 12 Feb 2022 04:23:28 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 89F2A60D36 for ; Sat, 12 Feb 2022 12:23:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 719B2C340E7; Sat, 12 Feb 2022 12:23:26 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="ZmgvObLo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1644668605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Edu78Slk3keL46bYXPo4PPqvMk1tMqWFnH0+9/7BiN8=; b=ZmgvObLoxfPudW0Y8I05OQ8JcGxmBsniS2IKVWxHJiuynZLEVuQgFc4DJghc5lg0N0/ll6 /tmSsAIETAiazbnkXHX4h1nEKV37K3E+uswIO5OL2U2Quh2Le6lzUVpTQx3hm7soU/1Wf8 A5g5O9LPp9MwbYHVnqexKBnN0XdkNkI= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 6b7f3265 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 12 Feb 2022 12:23:24 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org, linux@dominikbrodowski.net Cc: "Jason A. Donenfeld" Subject: [PATCH v2 00/10] random: re-group and re-document functions Date: Sat, 12 Feb 2022 13:23:08 +0100 Message-Id: <20220212122318.623435-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 We previously had massive documentation comments and functions strewn all about. This attempts to restore sanity by dividing the code into a few sections: - Initialization and readiness waiting. - Fast key erasure RNG. - Entropy accumulation and extraction. - Entropy collection. - Userspace read/write. - Sysctl. The result of this ordering and this grouping is only 2 forward declarations, indicating that this is probably a sensible grouping. Also, some documentation that was just hopelessly out of date been removed. We'll later look into re-adding parts of this to the Linux man pages project. No functional changes. Jason A. Donenfeld (10): random: introduce drain_entropy() helper to declutter crng_reseed() random: remove useless header comment random: remove whitespace and reorder includes random: group initialization wait functions random: group crng functions random: group entropy extraction functions random: group entropy collection functions random: group userspace read/write functions random: group sysctl functions random: rewrite header introductory comment drivers/char/random.c | 1899 ++++++++++++++++++++-------------------- include/linux/random.h | 6 +- 2 files changed, 950 insertions(+), 955 deletions(-) -- 2.35.0