Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 381484 Details for
Bug 517942
sys-apps/rng-tools does not allow large fill-watermark for big entropy pools
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
larger poolsize patch
01_rngd.c_watermark_poolsize.patch (text/plain), 1.15 KB, created by
cilly
on 2014-07-24 08:37:52 UTC
(
hide
)
Description:
larger poolsize patch
Filename:
MIME Type:
Creator:
cilly
Created:
2014-07-24 08:37:52 UTC
Size:
1.15 KB
patch
obsolete
>diff -urNp rng-tools-4.original/rngd.c rng-tools-4/rngd.c >--- rng-tools-4.original/rngd.c 2012-08-02 06:19:09.000000000 +0200 >+++ rng-tools-4/rngd.c 2013-10-03 13:32:24.069885853 +0200 >@@ -93,7 +93,7 @@ static struct argp_option options[] = { > "Number of bytes written to random-device at a time (default: 64)" }, > > { "fill-watermark", 'W', "n", 0, >- "Do not stop feeding entropy to random-device until at least n bits of entropy are available in the pool (default: 2048), 0 <= n <= 4096" }, >+ "Do not stop feeding entropy to random-device until at least n bits of entropy are available in the pool (default: 2048), 0 <= n <= kernel entropy pool size (in bits)" }, > > { "quiet", 'q', 0, 0, "Suppress error messages" }, > >@@ -166,8 +166,11 @@ static error_t parse_opt (int key, char > argp_usage(state); > break; > case 'W': { >- int n; >- if ((sscanf(arg, "%i", &n) == 0) || (n < 0) || (n > 4096)) >+ int n, poolsize = 512; >+ FILE *pf; >+ pf = fopen( "/proc/sys/kernel/random/poolsize", "r" ); >+ fscanf( pf, "%d", &poolsize ); >+ if ((sscanf(arg, "%i", &n) == 0) || (n < 0) || (n > 8*poolsize)) > argp_usage(state); > else > arguments->fill_watermark = n;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 517942
: 381484