Re: [PATCH 1/2] random: Omit double-printing ratelimit messages

From: Dmitry Safonov
Date: Thu May 10 2018 - 14:37:48 EST


On Thu, 2018-05-10 at 14:19 -0400, Theodore Y. Ts'o wrote:
> On Thu, May 10, 2018 at 01:52:10PM +0100, Dmitry Safonov wrote:
> > Currently "suppressed" messages will be printed once in a second
> > for
> > unseeded/urandom warnings, but there is already custom message
> > which
> > says how many warnings are missing. So, let's skip suppressed
> > messages
> > until crng_init == 2.
>
> I'm not sure what you are trying to fix? The whole point of the
> ratelimit system is to nly allow no more than <burst> packages in a
> particular time interval. Once that time interval has expired,
> messages allowed again until they exceed the burst limit. So
> printing
> messages once a second is, in fact, working as intended.


Ok, then what's the purpose of those messages?
: pr_notice("random: %d get_random_xx warning(s) missed "
: "due to ratelimiting\n",
: unseeded_warning.missed);
: pr_notice("random: %d urandom warning(s) missed "
: "due to ratelimiting\n",
: urandom_warning.missed);

I thought you want to print the summary after initializing random,
not once per second?

--
Thanks,
Dmitry