[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1380037587.3165.82.camel@edumazet-glaptop>
Date: Tue, 24 Sep 2013 08:46:27 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: Tom Herbert <therbert@...gle.com>, davem@...emloft.net,
netdev@...r.kernel.org, jesse.brandeburg@...el.com
Subject: Re: [PATCH] net: net_secret should not depend on TCP
On Tue, 2013-09-24 at 17:28 +0200, Hannes Frederic Sowa wrote:
> But couldn't it be that get_random_bytes always returns 0 and we won't make
> any progress here. Does the reseed happen from irq context or from softirqs? I
> always thought it would be from a softirq (which could be blocked).
Really if get_random_bytes() could return 0 forever I think we would
have a big problem with its implementation and documentation :
/*
* This function is the exported kernel interface. It returns some
* number of good random numbers, suitable for key generation, seeding
* TCP sequence numbers, etc. It does not use the hw random number
* generator, if available; use get_random_bytes_arch() for that.
*/
void get_random_bytes(void *buf, int nbytes)
{
extract_entropy(&nonblocking_pool, buf, nbytes, 0, 0);
}
EXPORT_SYMBOL(get_random_bytes);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists