Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6030916iog; Thu, 23 Jun 2022 09:55:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ugjpHkIX/52uPI5ePoaye2tSRLkSjEE6UC4iIGSmcs9IyJP+lPFg8dNEZYMAEd8+U3xpQi X-Received: by 2002:a05:6402:2554:b0:435:a3fb:9ab4 with SMTP id l20-20020a056402255400b00435a3fb9ab4mr12182100edb.5.1656003345039; Thu, 23 Jun 2022 09:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656003345; cv=none; d=google.com; s=arc-20160816; b=cmvaBXXNx0yGBBqPZYzRA+l6IKdspU0uLRU5RR4AKNEpC/mVcviTX8HNdB4atN0oxA UESy7ywwzw6+PkCU052JvwrRZfBmPvE82X8cMLljevzhvMI+QEN2Uz8GC+iGb2fkXk3l M304xkV4qPf8r/QX5mXar0Hi7oyGJTKZGgACLWD4XQ2Ri+gZW+lnB+SzUH2j+arvtbUZ 7QVC3bz6yO+sXWGgmw7qqc+ilsESBopBQ07rkkRvx2YwVNGwnDx4z3s8EjoJSxRgDcWO RDUS7HyXWaZEbjpQGwKhq2z0vL1JUGbxyiiw5mRxgcNuLocwKMICHPvbwLaVqiBAqxR1 xnAQ== 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=GcVTUVXNAOQDKEILEFo5v9cjAAp5eFQIdgO+JscYjaE=; b=YjqQHJTQ88wNwgK0nKn4ERaNABR994Wk6/3YCZ81I0cvDT6GjZElQtYEmV4NS5cAya M2wLvRtU7nG9HFypJFWZjBxHBtBxWAnuhL+oi/smaKCo2sUfZN0tRCucv/UMkYXpMsnj OaqqhSu8eqxDy/QxcxFk8RFG3BtRV8MjcZ+ZcjN2VAVKuJulCaHcZ8l+hJiUQ11EkIiX utUWR9WAhdxVj1UJF2T143mZ+cCWRmAE1qH7JBwPxibR79E3nZF8rDNrYEQ5H4hh8Adi oLcdS0VmBi/c9Lewjy7zMYwxSEdkvbDifxx5+9GHx+wOoHvZiJubQ0jju5QNuDloUsAk L1KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NvMtM/q+"; 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 g21-20020a1709065d1500b006febc5db63bsi7503477ejt.888.2022.06.23.09.55.20; Thu, 23 Jun 2022 09:55:45 -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="NvMtM/q+"; 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 S232528AbiFWQqu (ORCPT + 99 others); Thu, 23 Jun 2022 12:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbiFWQqR (ORCPT ); Thu, 23 Jun 2022 12:46:17 -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 1FD444993A; Thu, 23 Jun 2022 09:46:13 -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 A723E61F93; Thu, 23 Jun 2022 16:46:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95A2AC3411B; Thu, 23 Jun 2022 16:46:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656002772; bh=c5tXv7Sm5AN8vh85CRQru6QUw77VvvZ6qZ96H1GaVwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NvMtM/q+j6TB8SONrVriTcnm9UGxrY3IL8njoWf32FwNFfJ1mZ5DLEhTtS3EBG18w 2N5cgRYQxwb6ISUz+0jZ004Yah8D6AJiVfRbYlBD/Yfe2X1JOTOne5Wi7jw22ub5hz qQktkI6CFFrkAU0oEKgfu82FnZVfzDlpMUkAu/+w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Theodore Tso Subject: [PATCH 4.9 020/264] random: rate limit unseeded randomness warnings Date: Thu, 23 Jun 2022 18:40:13 +0200 Message-Id: <20220623164344.637708538@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: Theodore Ts'o commit 4e00b339e264802851aff8e73cde7d24b57b18ce upstream. On systems without sufficient boot randomness, no point spamming dmesg. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1637,8 +1637,9 @@ static void _warn_unseeded_randomness(co #ifndef CONFIG_WARN_ALL_UNSEEDED_RANDOM print_once = true; #endif - pr_notice("random: %s called from %pS with crng_init=%d\n", - func_name, caller, crng_init); + if (__ratelimit(&unseeded_warning)) + pr_notice("random: %s called from %pS with crng_init=%d\n", + func_name, caller, crng_init); } /*