Subject: kern/11164: doc/code mismatch for rnd_add_uint32
To: None <gnats-bugs@gnats.netbsd.org>
From: Havard Eidnes <he@runit.no>
List: netbsd-bugs
Date: 10/08/2000 03:14:08
>Number:         11164
>Category:       kern
>Synopsis:       doc/code mismatch for rnd_add_uint32
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 08 03:14:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Havard Eidnes
>Release:        NetBSD-1.5_ALPHA2
>Organization:
	RUNIT AS
>Environment:
	
System: NetBSD vader.runit.sintef.no 1.4 NetBSD 1.4 (VADER) #2: Mon Jun 14 13:08:51 MEST 1999 he@vader.runit.sintef.no:/usr/src/sys/arch/i386/compile/VADER i386


>Description:
	The documentation for rnd_add_uint32 says:

     rnd_add_uint32(rndsource_element_t *rnd_source, u_int32_t datum)
...
              If it is desired to mix in the datum and to add in a timestamp,
              but not to actually estimate entropy from a source of random-
              ness, passing NULL for rnd_source is permitted, and the device
              does not need to be attached.
	
	This does not appear to match the code, which does as the
	first step in rnd_add_uint32:

        /*
         * If we are not collecting any data at all, just return.
         */
        if (rs == NULL)
                return;


>How-To-Repeat:
	See above.
>Fix:
	None supplied.  It is not entirely clear whether this is a
	software or documentation bug, although I lean towards the
	former.
>Release-Note:
>Audit-Trail:
>Unformatted: