Bug 1178871

Summary: rngd man page incorrectly displays /dev/hwrandom as default device
Product: Red Hat Enterprise Linux 7 Reporter: Rachel Sibley <rasibley>
Component: rng-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: bhu, emcnabb, jbastian
Target Milestone: rcKeywords: ManPageChange
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 12:48:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1353018    

Description Rachel Sibley 2015-01-05 15:07:04 UTC
Description of problem:

The man pages for rngd is displaying /dev/hwrandom as the default device yet the source code shows /dev/hwrng.  Man pages should be updated to reflect the correct default device.

Version-Release number of selected component (if applicable):
rng-tools-5-2.ael7a.ppc64le

How reproducible:
Always

Steps to Reproduce:
1. Run 'man rngd'


Actual results:
-r file, --rng-device=file 
   Kernel device used for random number input (default: /dev/hwrandom)


Expected results:
-r file, --rng-device=file 
   Kernel device used for random number input (default: /dev/hwrng)


Additional info:

~]# hostname
ibm-p8-kvm-01-guest-02.lab.eng.rdu.redhat.com

~]# uname -r
3.10.0-201.ael7a.ppc64le

~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 Beta (Maipo)

~]# rpm -q rng-tools
rng-tools-5-2.ael7a.ppc64le


~]# man rngd
RNGD(8)                     System Manager's Manual                    RNGD(8)

NAME
       rngd - Check and feed random data from hardware device to kernel random
       device

SYNOPSIS
       rngd [-b, --background]  [-f,  --foreground]  [-i,  --ignorefail]  [-o,
       --random-device=file]  [-p,  --pid-file=file]  [-r,  --rng-device=file]
       [-s, --random-step=nnn] [-W, --fill-watermark=nnn] [-d,  --no-drng=1|0]
       [-n,  --no-tpm=1|0]  [-q,  --quiet]  [-v,  --verbose] [-?, --help] [-V,
       --version]

DESCRIPTION
       This daemon feeds data from a random number generator to  the  kernel's
       random  number  entropy  pool,  after first checking the data to ensure
       that it is properly random.

       The -f or --foreground options can be used to tell rngd to avoid  fork‐
       ing  on  startup.   This  is  typically  used for debugging.  The -b or
       --background options, which fork and put rngd into the background auto‐
       matically, are the default.

       The  -r  or  --rng-device  options  can  be used to select an alternate
       source of input, besides the default /dev/hwrandom.  The -o  or  --ran‐
       dom-device  options  can  be used to select an alternate entropy output
       device, besides the default /dev/random.  Note that  this  device  must
       support the Linux kernel /dev/random ioctl API.

OPTIONS
       -b, --background
              Become a daemon (default)

       -f, --foreground
              Do not fork and become a daemon

       -p file, --pid-file=file
              File  used  for  recording  daemon  PID,  and multiple exclusion
              (default: /var/run/rngd.pid)

       -i, --ignorefail
              Ignore repeated fips failures

       -o file, --random-device=file
              Kernel device used for random number output (default:  /dev/ran‐
              dom)

       -r file, --rng-device=file
              Kernel device used for random number input (default: /dev/hwran‐
              dom)

       -s nnn, --random-step=nnn
              Number of bytes written to random-device at a time (default: 64)

       -W n, --fill-watermark=nnn
              Once we start doing it, feed entropy to random-device  until  at
              least  fill-watermark  bits  of  entropy  are  available  in its
              entropy pool (default: 2048).  Setting this too high will  cause
              rngd  to  dominate the contents of the entropy pool.  Low values
              will hurt system performance during entropy starves.  Do not set
              fill-watermark  above the size of the entropy pool (usually 4096
              bits).

       -d 1|0, --no-drng=1|0
              Do not use drng as a source of random number input (default:0)

       -n 1|0, --no-tpm=1|0
              Do not use tpm as a source of random number input (default:0)

       -q, --quiet
              Suppress error messages

       -v, --verbose
              Report available entropy sources

       -?, --help
              Give a short summary of all program options.

       -V, --version
              Print program version

AUTHORS
       Philipp Rumpf
       Jeff Garzik - jgarzik
       Matt Sottek
       Brad Hill

rng-tools 5                       March 2001                           RNGD(8)

rngd.c source code:
------------------------
static struct argp_option options[] = {
        { "foreground", 'f', 0, 0, "Do not fork and become a daemon" },

        { "ignorefail", 'i', 0, 0, "Ignore repeated fips failures" },

        { "background", 'b', 0, 0, "Become a daemon (default)" },

        { "random-device", 'o', "file", 0,
          "Kernel device used for random number output (default: /dev/random)" },

        { "rng-device", 'r', "file", 0,
          "Kernel device used for random number input (default: /dev/hwrng)" },
<snip>


static struct rng rng_default = {
        .rng_name       = "/dev/hwrng",
        .rng_fd         = -1,
        .xread          = xread,
};

Comment 2 Neil Horman 2015-03-10 20:25:49 UTC
changes are checked in but mock keeps failing.  I'll need to try again tomorrow and hope rel-eng has this solved

Comment 5 Vilém Maršík 2017-05-02 22:52:27 UTC
rng-tools-5-2.el7.x86_64:
# man rngd | grep /dev
       /dev/hwrandom.   The  -o  or  --random-device  options can be used to select an alternate entropy output device,
       besides the default /dev/random.  Note that this device must support the Linux kernel /dev/random ioctl API.
              Kernel device used for random number output (default: /dev/random)
              Kernel device used for random number input (default: /dev/hwrandom)


rng-tools-5-9.el7.x86_64:
# man rngd | grep /dev
       /dev/hwrng.  The -o or --random-device options can be used to select an alternate entropy output device, besides
       the default /dev/random.  Note that this device must support the Linux kernel /dev/random ioctl API.
              Kernel device used for random number output (default: /dev/random)
              Kernel device used for random number input (default: /dev/hwrng)

Comment 6 errata-xmlrpc 2017-08-01 12:48:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2262