[OneRNG-Discuss] Debian 12 kernel ignoring entropy from OneRNG?

Paul Campbell paul at taniwha.com
Fri Mar 15 02:27:05 GMT 2024


On Wednesday, 13 March 2024 11:35:04 PM NZDT Tom Yates wrote:
> I've got a D12 system, kernel 6.1.0-18, with an attached OneRNG.  As far
> as I can tell, the OneRNG isn't filling up the entropy pool: cat
> /proc/sys/kernel/random/entropy_avail always returns 256 .
> 
> The OneRNG is inside the system case, on a USB cable, and the case is in a
> colo about 50 miles away, so it's difficult for me to see the LED.  But
> when the system is rebooted, onerng.sh starts up just fine; I see it in
> the process table:
> 
> root        1215  0.0  0.0   2576   892 ?        S    09:14   0:00 /bin/sh
> /sbin/onerng.sh feeder ttyACM0
> 
> I see it sleep for 5 seconds:
> 
> root        8033  0.0  0.0   2484   928 ?        S    09:34   0:00 sleep 5
> 
> then fire up and send a bunch of entropy to /dev/random via dd:
> 
> root        8069 16.6  0.0   2532   924 ?        R    09:34   0:00 dd
> if=/dev/ttyACM0 of=/dev/random bs=128 count=200
> 
> at which point it goes back to sleep for 5 seconds.  strace-ing the
> process shows the same pattern of events, which I think is what's expected
> of it.

The way the kernel handles and accounts for entropy changed a few years ago, 
it used to provide an API with flow control that we could use to wake up the 
OneRNG and grab data when the kernel needed it - that was then broken so that 
we needed to change the API to work differently, now days the OneRNG daemon 
blindly writes data to the kernel at a fixed rate (every N seconds, you can 
change N from the config file) 

	Paul






More information about the Discuss mailing list