Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555094 - sys-apps/rng-tools: man page reports misleading default value for --fill-watermark
Summary: sys-apps/rng-tools: man page reports misleading default value for --fill-wate...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-16 16:51 UTC by Göktürk Yüksek
Modified: 2015-08-14 06:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed fix for manpage (rng-tools-fix-manpage-default-fill-watermark.patch,756 bytes, patch)
2015-07-17 01:48 UTC, Göktürk Yüksek
Details | Diff
Patch for the ebuilds (rng-tools-ebuild-fixes.patch,909 bytes, patch)
2015-07-17 01:49 UTC, Göktürk Yüksek
Details | Diff
Patch manpage inside ebuild with sed (rng-tools-5-manpage-wm-fix.patch,758 bytes, patch)
2015-07-21 15:56 UTC, Göktürk Yüksek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Göktürk Yüksek archtester gentoo-dev 2015-07-16 16:51:40 UTC
According to rngd man page the default value for the '--fill-watermark' option is 2048 bits. However, upon examining default_watermark() function in rngd_linux.c, it turns out that this is true for systems where poolsize cannot be obtained. In linux, the pool size can be obtained by reading '/proc/sys/kernel/random/poolsize'. If rngd is capable of reading the proc entry, as it should be, then it sets the --fill-watermark value to be 75% of the total pool size, typically 3072 bits.

Gentoo mitigates this problem by explicitly specifying the '--fill'watermark 2048' in the init script. Still, it is ambiguous which is the intended default value (2048 or 3072 bits), and which one Gentoo should provide by default.


Reproducible: Always
Comment 1 Göktürk Yüksek archtester gentoo-dev 2015-07-17 01:48:40 UTC
Created attachment 406954 [details, diff]
Proposed fix for manpage

For reference purposes:
- Suse uses 3700 bits for watermark
- Debian uses 50%
- Fedora goes with the default 75%

There doesn't seem to be any consensus on the default value. I suggest that we modify the manpage to reflect the correct behaviour and leave the default 2048 bits provided by the init script as is.
Comment 2 Göktürk Yüksek archtester gentoo-dev 2015-07-17 01:49:16 UTC
Created attachment 406956 [details, diff]
Patch for the ebuilds
Comment 3 Göktürk Yüksek archtester gentoo-dev 2015-07-21 15:56:59 UTC
Created attachment 407350 [details, diff]
Patch manpage inside ebuild with sed

As per our discussion on #gentoo-proxy-maint with idella4, patching the manpage with sed is better than creating a separate patch file. It takes up less space than the patch file and easier to read when it's inside the ebuild. Note that this is only for rng-tools-5, although it should apply the same way to rng-tools-4 too. There is a stabilization bug open for rng-tools-5, so it makes sense to patch only rng-tools-5 and get rid of rng-tools-4 as soon as possible.