Received: by 10.192.165.148 with SMTP id m20csp3165136imm; Sun, 29 Apr 2018 15:52:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpw5G8Lk1g3wE6GyBZ0R/rZHxp3svaMBsFc1U1NpZPj3lJezvxuGV7iNPoOGVfbVJNHNdpx X-Received: by 2002:a17:902:6a8b:: with SMTP id n11-v6mr10198576plk.36.1525042337912; Sun, 29 Apr 2018 15:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525042337; cv=none; d=google.com; s=arc-20160816; b=cpUol1KFYmmTeQETfUqKzaoKukvzj3EH4hMbV7JFi7XF2H/WFv9xaQjJdcN280bBno WIfGkV0bgg1RzOxMyB40pjLs02sd4Xtqpw8O6nZrXtO89kDNLbPsGFwoK5B16NkHwJjF JDUixnZ2HHUlAUVIdRXtQA2mN51JnD7HNwnGBAJBChO/XeclLhejLULKQryDB8pG1QmH cNcBYgjqzbizPm/SozC7pVDPRm8+tLYmIwUysvaXEaaW4qZ1rDcK2njuA5xOghpHj/I1 BROhXxs6dF63Twcfhu76gdxuUu8C6ocwCl+qpL4PF9R/H0YNmpCgGknBrkowOk4PgH7S m5AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=uPY/qAiEm8dj6PoYbJrgcFWgino3pjajd30WC8TDuWo=; b=aGcDhv51SfBqN5K2cD+qx5YsrvfkeMItpfkmvj4YhWmm98W0kW8Ekooo+JLvmxlzY+ qooIZgnLa7trTte58pdKCzrWUOzpufo7vqIvUNivtMSQEWkfWDppW/ZKD4K8CCuaTJnE k+Xe/FMEfPYw+iQmJx+8T/YZ0jfOuQ314E7VPlrIDkfdD2Z8uGFRDS6+pmWIv5h3jg0P tBgSDaJNf1n5ov6pD+I6WisngtoIMfiKl0GmlLf69mmgvWE1LsIXzWN1pfaEd1wJ5X8V 7PvDgUdS6Tqqu+CDMQEEnwBucBVX0BSTfuSou1XUsXmXBDCyl6iuFQPE6VZfJcTJJNV0 IAwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EFVpWTyj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3-v6si6331884pld.9.2018.04.29.15.52.04; Sun, 29 Apr 2018 15:52:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EFVpWTyj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754539AbeD2Wtf (ORCPT + 99 others); Sun, 29 Apr 2018 18:49:35 -0400 Received: from mail-ot0-f180.google.com ([74.125.82.180]:41711 "EHLO mail-ot0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754526AbeD2Wtc (ORCPT ); Sun, 29 Apr 2018 18:49:32 -0400 Received: by mail-ot0-f180.google.com with SMTP id t1-v6so7677908oth.8 for ; Sun, 29 Apr 2018 15:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uPY/qAiEm8dj6PoYbJrgcFWgino3pjajd30WC8TDuWo=; b=EFVpWTyjHwbSxXU7BpV/n1A+vJ9ANTT8LygkYjqNgzbczs0y4f7ItKts9XxWp6y4Ac q1rat6MDj2mcH6DmtqdMtYtMCXwjjfmNBWGwkb5MiuSfNsb0XQl1pPNX+ttsoB5vEwSB Oqp/wiMZSi4Ybe//ixmLmbJsrSGEUNj1lLx8tO77atYJh57JZw5zBe7yPXssxHfGWchD Ido7A/QAXBsiCMj4K5eAz0dEPb1A0ysbjTfTJNWfySyXqemIfJEg8zR23MZPlnJoxfxe e60MSPSqzjibJzeL7XQvH3hoi11Az4blEc7dZSWuUnBy0Gi9k43hQ94UkJdWK+ij1vBR RT+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uPY/qAiEm8dj6PoYbJrgcFWgino3pjajd30WC8TDuWo=; b=gFSt6d5rH2CsFDFF0W1IY11fq8MtletrH/GULcj1aUuSE73YBV+pxgd3zS9lOG0tnP JtRwJHEN/X6U6RelTi0rCnlc1mgm5UPuyPPXQhrKzTt6GdntuR4v7iLAnJNN6yIwEeDV kJ1zwZ8UjCzu35jEeFO3rnV6db8IUAEaAMwVRMtiqXnGQxCNrVZM6WR/H5CD1FJZdjwy 7YGlaxi71I8hbO5NWea786SQPTa1xQ4Mu7GozFrWukHCa/KmQi3FUFDDhoM/zOD6Bzk8 4Q4zA12to5bHc1rWHJrh8uBTlvA4N2XHSrIUN098YEwb5f5odlXcNRY0ov5u4EykfuVZ ET8Q== X-Gm-Message-State: ALQs6tC8vVUckWs1cw1+CGAky530nWKy76N9vdaLGWGQcadex54Skl33 my8bMK/qPE3pAHAoo4/pSzs= X-Received: by 2002:a9d:12b4:: with SMTP id g49-v6mr6463425otg.379.1525042171532; Sun, 29 Apr 2018 15:49:31 -0700 (PDT) Received: from sultan-box ([107.193.118.89]) by smtp.gmail.com with ESMTPSA id j131-v6sm3522108oih.11.2018.04.29.15.49.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Apr 2018 15:49:30 -0700 (PDT) Date: Sun, 29 Apr 2018 15:49:28 -0700 From: Sultan Alsawaf To: "Jason A. Donenfeld" Cc: "Theodore Y. Ts'o" , Pavel Machek , LKML , Jann Horn Subject: Re: Linux messages full of `random: get_random_u32 called from` Message-ID: <20180429224928.teg6zyfjxndbcnsn@sultan-box> References: <20180426235630.GG5965@thunk.org> <3eb5761e-7b25-4178-0560-fba5eb43ce6a@gmail.com> <20180427201036.GL5965@thunk.org> <20180429143205.GD13475@amd> <20180429170541.lrzwyihrd6d75rql@sultan-box> <20180429184101.GA31156@amd> <20180429202033.ysmc42mj2rrk3h7p@sultan-box> <20180429220519.GQ5965@thunk.org> <20180429222625.35tedjzkizchudcm@sultan-box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 12:43:48AM +0200, Jason A. Donenfeld wrote: > > - if ((fast_pool->count < 64) && > > - !time_after(now, fast_pool->last + HZ)) > > - return; > > - > > I suspect you still want the rate-limiting in place. But if you _do_ > want to cheat like this, you could instead just modify the condition > to only relax the rate limiting when !crng_init(). Good idea. Attached a new patch that's less intrusive. It still fixes my issue, of course. Sultan From 6870b0383b88438d842599aa8608a260e6fb0ed2 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Sun, 29 Apr 2018 15:44:27 -0700 Subject: [PATCH] random: don't ratelimit add_interrupt_randomness() until crng is ready --- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 38729baed6ee..8c00c008e797 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1201,7 +1201,7 @@ void add_interrupt_randomness(int irq, int irq_flags) } if ((fast_pool->count < 64) && - !time_after(now, fast_pool->last + HZ)) + !time_after(now, fast_pool->last + HZ) && crng_ready()) return; r = &input_pool; -- 2.14.1