From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C71FC433DB for ; Wed, 13 Jan 2021 17:12:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B28D2339F for ; Wed, 13 Jan 2021 17:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727807AbhAMRLp (ORCPT ); Wed, 13 Jan 2021 12:11:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:51764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbhAMRLo (ORCPT ); Wed, 13 Jan 2021 12:11:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D05B2339F; Wed, 13 Jan 2021 17:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610557864; bh=8xJJDd/LVtplXoIwuRfT36wIVGuC/ZK1fPhF+6QXzW0=; h=From:To:Cc:Subject:Date:From; b=CGUOWvg3Brm8rQPUtEPyrDMonhbTPlYZ4huVEAS8VpS+/zHVHfZZ2pyw0Xil1zFgV HxPvqD8sx6scXQMVRxKXhAKaanrgsPzMYV+QaRVe4cFXBYHx063zY0JtSL9WyPgyQT Omrsq5i+strnCIE++V7xROjpExy36QOf9SEuKkLr4CMNHLB0hooyXNk8ow/yeJnfQf e0MHz+Iv06/qcM9OKavKBNGvr2up/6kE1/6YxXpkq5ssMaUgpl+JDAZNLa9FTn7o9H 9ApMSsBzPCAzBkJK4yzJ6u3EVlORIRKyVvTULN2C/4CE7k+0O2S10v6jIYdkbryq4W N1eokmNFG6bsw== From: Mark Brown To: tytso@mit.edu Cc: linux-kernel@vger.kernel.org, Mark Brown Subject: [PATCH] random: Document add_hwgenerator_randomness() with other input functions Date: Wed, 13 Jan 2021 17:10:14 +0000 Message-Id: <20210113171014.2830-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The section at the top of random.c which documents the input functions available does not document add_hwgenerator_randomness() which might lead a reader to overlook it. Add a brief note about it. Signed-off-by: Mark Brown --- This patch is almost a year old at this point... drivers/char/random.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/char/random.c b/drivers/char/random.c index 5f3b8ac9d97b..3e17e04c3cef 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -228,6 +228,14 @@ * particular randomness source. They do this by keeping track of the * first and second order deltas of the event timings. * + * There is also an interface for true hardware RNGs: + * + * void add_hwgenerator_randomness(const char *buffer, size_t count, + * size_t entropy); + * + * This will credit entropy as specified by the caller, if the entropy + * pool is full it will block until more entropy is needed. + * * Ensuring unpredictability at system startup * ============================================ * -- 2.20.1