Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6136247iog; Thu, 23 Jun 2022 12:06:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tz9n91u+8yruYLBJ/8P3xC0B9ME0OM+nadEh8tppDoLd4pfjnvKbcOJOzdNv3B9FW+8HaJ X-Received: by 2002:a17:90a:778a:b0:1ea:264c:e9af with SMTP id v10-20020a17090a778a00b001ea264ce9afmr5487887pjk.246.1656011178252; Thu, 23 Jun 2022 12:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011178; cv=none; d=google.com; s=arc-20160816; b=LqPofmqu3SwNQsh0iiyLCpEA9h4fXADoeHtTD1XNZ/939VbBI3dle4oUK3zZPFeTQj BVu43slzWECnOKtMLussYVLELkhkIHNemgWRyAUr4uJNWS7I+0+DWR9L+Q1oHmJY8sUR 0mhlrCSW9BgVvD/f6N0+M80PIl23NaciUfs/L9D8Ppvf0qHXUzf7ZqwOJpWrYolY+VZM XqABn3qAR1CiA8KuXtmcRdEmEhRPmR051cEKzLBHKnj96Nx1jtvzpYSRKg0/udLeDRUc WF3fHaHKYpwKz/FgriOVt1hvwQdfnJaBahGTC/4UXcUyDFjIQLQ268A5hFftXaHW2BNK bPXw== 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=/OpgiBeZFjmPD2U1znQiNQ+ixUjJ3RhLACRqth35kH4=; b=BtfjLkFy6hZCmus2g7uO7IvJA+PGfHTUwj1heRG6S87KO9yjg3hJCROG18Z/1Ncy8y o+/iJWJrKuox9vBhw5ukdnXEPj2BJy1DAtXi0GT/ZhrumCNCuVQjyl52dqtUvHHg+grk srOOJrWTpxeRZzyKtJ+ZYFD+khJRnhnn8g9WqHzr0VK/YnK/utCTC4SRKnqMY04b4g8o 3vpE1vjJL5m36OAp7sORZzqSYy8WLqkZgkD960Uq4+EZbPHIo+Vc8tvJoKGCtUgJA927 ypapc0sPjx7EUAFR7Qq2ZjYXnfUVVIed+nU+6AzlIbh76twAI3EmX7CeF4j2Z3h7knsN 4yLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BuReiiCb; 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 d1-20020aa797a1000000b005252bb2fda9si7664pfq.71.2022.06.23.12.06.06; Thu, 23 Jun 2022 12:06:18 -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=BuReiiCb; 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 S236444AbiFWSLC (ORCPT + 99 others); Thu, 23 Jun 2022 14:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235703AbiFWSIt (ORCPT ); Thu, 23 Jun 2022 14:08:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4551DBC262; Thu, 23 Jun 2022 10:19:56 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2F52661E07; Thu, 23 Jun 2022 17:19:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8ED3FC341CE; Thu, 23 Jun 2022 17:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004795; bh=0gBkQ6wLl5EpKBmIFvV+KeU4l2koaTdbhqt98TGAaLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BuReiiCbhwN60B+2hCrKljsaDgLX5CSPhOHM4QJKBdTiecFIxmzFFsc19n04+9RBO Q6rPSq1Ar6/WZ9AYJhA1QexwmjD5laFsfAXuZl7ucsnZMYCXQwrc1JR5TGmrA71ckA kLgO9fkWqAUym4LrOBFodD40BQvkX+9DMwkLx4Oc= 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.19 125/234] random: re-add removed comment about get_random_{u32,u64} reseeding Date: Thu, 23 Jun 2022 18:43:12 +0200 Message-Id: <20220623164346.594509108@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@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 @@ -226,9 +226,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. * *********************************************************************/