Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6132509iog; Thu, 23 Jun 2022 12:02:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vYyf1GCwIhGSDJLTjdE0IimhRxLZFRYfGjF9KdikH/rvuDJhHpjWVt2KM8pQt3TpfksBTq X-Received: by 2002:a05:6402:448c:b0:435:9dcc:b8a5 with SMTP id er12-20020a056402448c00b004359dccb8a5mr12604935edb.287.1656010948690; Thu, 23 Jun 2022 12:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010948; cv=none; d=google.com; s=arc-20160816; b=fgntajikZaYHwRsrOIz5Ye8bbNgdqJpW7SjY4kHlCLEoM0J05Q8asrq87cxpZcMfOx Q5gq/r2IVYwLaFdHZXKfIeOzeCIkPsw5EzbgbRtjlUh8mvRX2bhWjx+E92f34VF1qKxl ZehSBN5YTfpiuZQOCXabv7L5aT2vzLX0Ba/jHk5vkpHduwpuLZHgG1AhL0cU5g7xinUL yG8AkIwShRjkdRiQqrIZq8vQEcq+qlB/MZ2uxfzVVGr2tG4jTD0WRRl9kor2UQKsoCGz RteUFmpjAWoko9Qgf95XU6Xwh57eU6gcx6nf8xpQvVPfZDZk8G05h6o4IEhfRyO2VObk aa4A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IsL6Tebw1KJZFfWghQDW4EBYHnsqjNLLnM543gvYFPA=; b=fmj18+uHYqegX+E6K9uvs73kN6OM+GJtd+binYzUNN8QKCEbCiFxNPtB9tSzr7JO5w BT5P4UEnMMbJq5DaHLShUeZkxyAmE99+e80WXYZ1eJw1ET18OwQiaA2HoUOjKu0RI/rr Gwpq+RFWSdQsQYKsTZRlZWdxpD9osYN3YG2952PlQa7s1+01AcznNMivZ0SwIB2QzIJg GAbkyYhuwZEgc9N2RK7ZYbwJnwIt+yBDs4fYqws/VPs1SS635N4RBYdQucJ/D/ZtLkcE 4Gs/oqwzYwZ01jgwOocJ9aBd/Jfjj1iiJZwQscTapuRs2kHqnxKA4mr9bJkzjUA6cNmI bkqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zeUpNJH7; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a056402270700b00435681044a9si470186edd.372.2022.06.23.12.02.03; Thu, 23 Jun 2022 12:02:28 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=zeUpNJH7; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233192AbiFWRC2 (ORCPT + 99 others); Thu, 23 Jun 2022 13:02:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233742AbiFWQ6Z (ORCPT ); Thu, 23 Jun 2022 12:58:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 240034EF7D; Thu, 23 Jun 2022 09:53:48 -0700 (PDT) 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 31C11B8248C; Thu, 23 Jun 2022 16:53:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A93FC36AE2; Thu, 23 Jun 2022 16:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003224; bh=15bRerzgbepuov9EEqqGAXS7YopqqG4A1cmYbhPkl0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zeUpNJH76gzcdB3iVdnbN3UiXb7RVEXnOt6umFuUsNzSVDzxYYIsdcc0DASBm6gg+ 6nwBEY52ZpW/QrEx+54es9PL0JMir1xsP0YTE0wyisKpITW0muIiCyOL/m/c9bDw33 DwV2/vgc8pjh6/iq9oGtP2XvoGGjDF/7JMphMzRo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dominik Brodowski , "Jason A. Donenfeld" Subject: [PATCH 4.9 168/264] random: re-add removed comment about get_random_{u32,u64} reseeding Date: Thu, 23 Jun 2022 18:42:41 +0200 Message-Id: <20220623164348.818089732@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 From: "Jason A. Donenfeld" commit dd7aa36e535797926d8eb311da7151919130139d upstream. The comment about get_random_{u32,u64}() not invoking reseeding got added in an unrelated commit, that then was recently reverted by 0313bc278dac ("Revert "random: block in /dev/urandom""). So this adds that little comment snippet back, and improves the wording a bit too. Reviewed-by: Dominik Brodowski Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -227,9 +227,10 @@ static void _warn_unseeded_randomness(co * * These interfaces will return the requested number of random bytes * into the given buffer or as a return value. This is equivalent to - * a read from /dev/urandom. The integer family of functions may be - * higher performance for one-off random integers, because they do a - * bit of buffering. + * a read from /dev/urandom. The u32, u64, int, and long family of + * functions may be higher performance for one-off random integers, + * because they do a bit of buffering and do not invoke reseeding + * until the buffer is emptied. * *********************************************************************/