Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#25151 - [initscripts] rc.shutdown and entropy pool size

Attached to Project: Arch Linux
Opened by Taylan Ulrich B. (taylanub) - Sunday, 17 July 2011, 18:57 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 06 November 2011, 01:12 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Per random(4) manpage, on kernel 2.6, /proc/sys/kernel/random/poolsize is a read-only file giving the size of the pool in _bits_. It also says "it contains the value 4096", seemingly implying that this is globally true, so why should we read from the file at all?
On the other hand, the same manpage advertises the practice of reading the pool size from that file, and using it as a _byte_ count for dd, which is exactly what rc.shutdown does.

We have bad documentation and resulting bad practice at hand.

Assuming that this value of 4096 still can change along with kernel versions and perhaps compilation options or similar, reading the value from the file (which we already do) and dividing it by 8 (which we don't do) would probably be the best solution.

So slap a ((POOL_SIZE /= 8)) onto there after the 'read POOL_SIZE'.
This task depends upon

Closed by  Tom Gundersen (tomegun)
Sunday, 06 November 2011, 01:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  In git (analogous patch sent to systemd and report filed with linux-man).
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 18 July 2011, 04:16 GMT
  • Field changed: Summary (rc.shutdown and entropy pool size → [initscripts] rc.shutdown and entropy pool size)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Packages: Core → Arch Projects)
  • Task assigned to Tom Gundersen (tomegun)
Interesting. Looks like systemd is also wrong http://cgit.freedesktop.org/systemd/tree/src/random-seed.c

Comment by Tom Gundersen (tomegun) - Saturday, 22 October 2011, 12:17 GMT
Sorry for taking so long to answer. It looks like you are right, thanks for reporting!

I emailed the manpage people (it looks to me that they are giving the example assuming a 2.4 kernel is in use), and I also pinged the systemd crowd.

I'll divide by eight in the next initscripts release. From my cursory glance, it looks like the misstake is harmless (famous last words).

Gaƫtan: You know about these sorts of things. should we panic, or just deal with it in the next regular release?

Loading...