GNU bug report logs - #6658
[PATCH] randread: don't require -lrt

Previous Next

Package: coreutils;

Reported by: Paul Eggert <eggert <at> CS.UCLA.EDU>

Date: Fri, 16 Jul 2010 21:18:01 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> CS.UCLA.EDU>
Cc: 6658 <at> debbugs.gnu.org
Subject: bug#6658: [PATCH] randread: don't require -lrt
Date: Sat, 17 Jul 2010 02:19:40 +0100
On 16/07/10 22:17, Paul Eggert wrote:
> In looking at the random part of coreutils some more, I see some
> issues.
> 
> 1.  Apps that use random numbers typically must link to -lrt,
>     for a very small benefit (nanosecond resolution rather than
>     microsecond resolution time stamp for random seed).  Often
>     this "benefit" is illusory as the time stamps really are not
>     nanosecond resolution.
> 
> 2.  If /dev/urandom is available, it should be used to seed
>     the ISAAC generator.  This will cost more than invoking
>     gettimeofday() but it's far more random.
> 
> 3.  We could get about 2X CPU performance on 64-bit machines by using
>     ISAAC64 instead of ISAAC.
> 
> The patch below implements (1); I haven't installed it.  I'd like to
> do (2) and (3) too, but thought I'd ask for feedback first.

All changes make sense.

`shred` doesn't need the entropy anyway as it's just
scribbling random data to make it more difficult
to recover data, and to hide its tracks.
Performance wise `shred` probably won't run faster as
it should saturate any disk, but using less CPU is good:

`sort -R` and `shuf` should benefit also.

thanks,
Pádraig.




This bug report was last modified 15 years and 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.