From owner-freebsd-bugs@freebsd.org Tue Sep 12 16:52:02 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 518B2E12310 for ; Tue, 12 Sep 2017 16:52:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F5957D19E for ; Tue, 12 Sep 2017 16:52:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CGq1xu020131 for ; Tue, 12 Sep 2017 16:52:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 222256] RPI random number generator underruns when BCM2835_RNG_USE_CALLOUT is set Date: Tue, 12 Sep 2017 16:52:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: stevek@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 16:52:02 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222256 --- Comment #2 from Stephen J. Kiernan --- Interesting. The RPi3 must be a bit different than the RPi2 (where the init= ial testing using callout was done.) It might make sense to have a sysctl in the case where one would want to use the callout version to be able to tweak it= as appropriate. However, it's better to use the default interrupt method rather than the callout, because, as you saw, there can be cases where the random bit gener= ator (RBG) cannot provide enough bits to satisfy a request, if the callout perio= d is too short. With the interrupt method, the RBG is programmed to raise an interrupt when the FIFO is full. When that occurs, the interrupt handler re= ads from the FIFO and feeds the bits read into the random_harvest_queue functio= n. However, that requires the FDT for the board to have a proper entry for the= RBG with an interrupt attribute, which I don't think the RPi3 FDT has currently. --=20 You are receiving this mail because: You are the assignee for the bug.=