public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* reading the same entropy twice
@ 2005-02-22 21:55 Bob O'Neill
  2005-02-22 22:08 ` Lee Revell
  2005-02-23  6:39 ` Matt Mackall
  0 siblings, 2 replies; 3+ messages in thread
From: Bob O'Neill @ 2005-02-22 21:55 UTC (permalink / raw)
  To: linux-kernel

Hello.

I have noticed that it is possible on an SMP box for two processes to
simultaneously read the same entropy out of /dev/urandom.  This
doesn't seem right to me.  I was using the entropy value to generate a
random number to use as a session ID, so occasionally there would be a
collision on session IDs, causing a login failure as session IDs are
required to be unique.  This issue does not appear to be related to
entropy depletion.

Could you provide me with some insight into why this is the case, if
it is intentional?  It seems like it could be addressed with a
spinlock.

Thanks.
-Bob

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-23  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-22 21:55 reading the same entropy twice Bob O'Neill
2005-02-22 22:08 ` Lee Revell
2005-02-23  6:39 ` Matt Mackall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox