Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-13 Thread David Ford

David Santinoli wrote:

> On Fri, Jan 12, 2001 at 07:53:14PM -0800, Rob Landley wrote:
> > If I do the dd line in the title under 2.4.0 I get an
> > out.txt file of 591 bytes.
> And it's the same under 2.2.x, too.
>
> > dd says it completes happily even when copying from
> > random.  0+100 records in, 0+100 records out.  It
> It's not a fault of dd, or of the read() system call, either. It's just the way
> /dev/random works - you can't read more bytes than those available in the
> entropy pool. And if you try, you'll just fail with no error.

It won't fail, it will block, then continue reading when more bytes are
available.  The application may time out however.

-d

-- ---NOTICE

-- fwd: fwd: fwd: type emails will be deleted automatically.
  "There is a natural aristocracy among men. The grounds of this are
  virtue and talents", Thomas Jefferson [1742-1826], 3rd US President



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-13 Thread David Santinoli

On Fri, Jan 12, 2001 at 07:53:14PM -0800, Rob Landley wrote:
> If I do the dd line in the title under 2.4.0 I get an
> out.txt file of 591 bytes.
And it's the same under 2.2.x, too.

> dd says it completes happily even when copying from
> random.  0+100 records in, 0+100 records out.  It
It's not a fault of dd, or of the read() system call, either. It's just the way
/dev/random works - you can't read more bytes than those available in the
entropy pool. And if you try, you'll just fail with no error.

Cheers,
 David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-13 Thread Bernd Eckenfels

In article <[EMAIL PROTECTED]> you wrote:
> If I do the dd line in the title under 2.4.0 I get an
> out.txt file of 591 bytes.
/dev/random will only give you as much bytes as are available. and even then
you should not do it cause you drain the random pool. Use /dev/urandom
instead.

Greetings
Bernd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-13 Thread David Santinoli

On Fri, Jan 12, 2001 at 07:53:14PM -0800, Rob Landley wrote:
 If I do the dd line in the title under 2.4.0 I get an
 out.txt file of 591 bytes.
And it's the same under 2.2.x, too.

 dd says it completes happily even when copying from
 random.  0+100 records in, 0+100 records out.  It
It's not a fault of dd, or of the read() system call, either. It's just the way
/dev/random works - you can't read more bytes than those available in the
entropy pool. And if you try, you'll just fail with no error.

Cheers,
 David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-13 Thread David Ford

David Santinoli wrote:

 On Fri, Jan 12, 2001 at 07:53:14PM -0800, Rob Landley wrote:
  If I do the dd line in the title under 2.4.0 I get an
  out.txt file of 591 bytes.
 And it's the same under 2.2.x, too.

  dd says it completes happily even when copying from
  random.  0+100 records in, 0+100 records out.  It
 It's not a fault of dd, or of the read() system call, either. It's just the way
 /dev/random works - you can't read more bytes than those available in the
 entropy pool. And if you try, you'll just fail with no error.

It won't fail, it will block, then continue reading when more bytes are
available.  The application may time out however.

-d

-- ---NOTICE

-- fwd: fwd: fwd: type emails will be deleted automatically.
  "There is a natural aristocracy among men. The grounds of this are
  virtue and talents", Thomas Jefferson [1742-1826], 3rd US President



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-12 Thread Rob Landley

--- David Ford <[EMAIL PROTECTED]> wrote:
> Rob Landley wrote:
> 
> > If I do the dd line in the title under 2.4.0 I get
> an
> > out.txt file of 591 bytes.
> 
> It isn't broken, you have no more entropy.  You must
> have some system
> activity of various sorts before you regain some
> entropy.  Moving the mouse
> around, hitting keys, etc, will slowly add more
> entropy.
> 
> -d

I'd wondered what urandom was for.  Thanks.

Rob


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-12 Thread John Heffner

> dd says it completes happily even when copying from
> random.  0+100 records in, 0+100 records out.  It

This means that dd completed 100 reads, and none of them were of the
requested length (1 bytes).

> takes about thirty seconds to finish on the dual
> gigahertz processor intel box I'm using to test it,
> which implies it's actually performing the truly
> impressive waste of CPU cycles I'm requesting from it.
>  I'm just not getting the data in my file.

/dev/random generates (hopefully) truly random values, and relies on
receiving interrupts.  It doesn't spend very many CPU cycles.  For most
purposes, /dev/urandom is adequate, and will be much faster for such large
quantities of data.

  -John

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-12 Thread David Ford

Rob Landley wrote:

> If I do the dd line in the title under 2.4.0 I get an
> out.txt file of 591 bytes.

It isn't broken, you have no more entropy.  You must have some system
activity of various sorts before you regain some entropy.  Moving the mouse
around, hitting keys, etc, will slowly add more entropy.

-d


-- ---NOTICE

-- fwd: fwd: fwd: type emails will be deleted automatically.
  "There is a natural aristocracy among men. The grounds of this are
  virtue and talents", Thomas Jefferson [1742-1826], 3rd US President



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-12 Thread David Ford

Rob Landley wrote:

 If I do the dd line in the title under 2.4.0 I get an
 out.txt file of 591 bytes.

It isn't broken, you have no more entropy.  You must have some system
activity of various sorts before you regain some entropy.  Moving the mouse
around, hitting keys, etc, will slowly add more entropy.

-d


-- ---NOTICE

-- fwd: fwd: fwd: type emails will be deleted automatically.
  "There is a natural aristocracy among men. The grounds of this are
  virtue and talents", Thomas Jefferson [1742-1826], 3rd US President



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-12 Thread John Heffner

 dd says it completes happily even when copying from
 random.  0+100 records in, 0+100 records out.  It

This means that dd completed 100 reads, and none of them were of the
requested length (1 bytes).

 takes about thirty seconds to finish on the dual
 gigahertz processor intel box I'm using to test it,
 which implies it's actually performing the truly
 impressive waste of CPU cycles I'm requesting from it.
  I'm just not getting the data in my file.

/dev/random generates (hopefully) truly random values, and relies on
receiving interrupts.  It doesn't spend very many CPU cycles.  For most
purposes, /dev/urandom is adequate, and will be much faster for such large
quantities of data.

  -John

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: BUG in 2.4.0: dd if=/dev/random of=out.txt bs=10000 count=100

2001-01-12 Thread Rob Landley

--- David Ford [EMAIL PROTECTED] wrote:
 Rob Landley wrote:
 
  If I do the dd line in the title under 2.4.0 I get
 an
  out.txt file of 591 bytes.
 
 It isn't broken, you have no more entropy.  You must
 have some system
 activity of various sorts before you regain some
 entropy.  Moving the mouse
 around, hitting keys, etc, will slowly add more
 entropy.
 
 -d

I'd wondered what urandom was for.  Thanks.

Rob


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/