lkml.org 
[lkml]   [2005]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: short read from /dev/urandom
On Sat, Jan 15, 2005 at 07:58:23PM -0800, Ulrich Drepper wrote:

> Matt Mackall wrote:
> >_Neither_ case mentions signals and the "and will return as many bytes
> >as requested" is clearly just a restatement of "does not have this
> >limit". Whoever copied this comment to the manpage was a bit sloppy
> >and dropped the first clause rather than the second:
>
> It still means the documented API says there are no short reads.

No. It says that /dev/urandom "contains" an unlimited amount
of bits - you can read as many bits from there as you want,
while /dev/random "contains" a limited amount of information -
you can exhaust it.

That is information about the device. There is no suggestion at all
about some special property that would guarantee that the normal
read() system call has special behavior in connection with /dev/urandom.

There is no special documented API. Now that this misunderstanding
occurred I suppose a clarifying sentence will be added.
Nothing special with /dev/urandom.

Applications that make special assumptions are broken.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.094 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site