Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jitterentropy-rngd decreases available entropy on arm64 #19

Closed
Djhg2000 opened this issue Mar 12, 2021 · 8 comments
Closed

jitterentropy-rngd decreases available entropy on arm64 #19

Djhg2000 opened this issue Mar 12, 2021 · 8 comments

Comments

@Djhg2000
Copy link

Tested on Mobian Unstable (Debian Sid based distribution targeting phones), jitterentropy-rngd squashes the available entropy (read from /proc/sys/kernel/random/entropy_avail) to a single digit number (in one of my test runs down from 383 to 2). Output sample below:

$ sudo jitterentropy-rngd -vvvv
jitterentropy-rngd - Debug: Injected 64 bytes with an entropy count of 32 bytes of entropy
jitterentropy-rngd - Verbose: 64 bytes written to /dev/random
jitterentropy-rngd - Debug: Install termination signal handler
jitterentropy-rngd - Debug: Install alarm signal handler
jitterentropy-rngd - Debug: Polling /dev/random
jitterentropy-rngd - Verbose: Wakeup call for select on /dev/random
jitterentropy-rngd - Debug: Injected 64 bytes with an entropy count of 32 bytes of entropy
jitterentropy-rngd - Verbose: 64 bytes written to /dev/random
jitterentropy-rngd - Debug: Polling /dev/random
jitterentropy-rngd - Verbose: Wakeup call for select on /dev/random
jitterentropy-rngd - Debug: Injected 64 bytes with an entropy count of 32 bytes of entropy
jitterentropy-rngd - Verbose: 64 bytes written to /dev/random

Last 4 lines repeats very quickly and easily fills the entire console buffer in under a second. The issue is not repeatable on Debian Sid running on amd64.

Both systems are running version 1.2.1-1 from the official Debian repositories.

@smuellerDD
Copy link
Owner

smuellerDD commented Mar 12, 2021 via email

@fortysixandtwo
Copy link

I'd just like to add from my own testing (on the pinephone):
If I kill jitterentropy-rngd the entropy does slowly start rising again (obviously faster if do f.e. touch the touchscreen a lot).
If I let it rise a bit (but below ~1300 or ~1400) and start jitterentropy-rngd in a second terminal all the available entropy is "sucked" to 0.
If I repeat the procedure but let it rise above ~1400 jitterentropy-rngd will be happy (aka not hogging one core at 100%) and the available entropy does not plummet to 0.

@smuellerDD
Copy link
Owner

smuellerDD commented Mar 14, 2021 via email

@smuellerDD
Copy link
Owner

smuellerDD commented Mar 15, 2021 via email

@Djhg2000
Copy link
Author

It does indeed sound a lot like #20 , I'll give the latest git a try and report back.

@Djhg2000
Copy link
Author

Djhg2000 commented Mar 15, 2021

Latest git solves the issue on Mobian. Mobian Unstable is using Linux kernel 5.11.6 so I think it's safe to say this and #20 is a duplicate issue (we just didn't know it earlier).

@smuellerDD
Copy link
Owner

smuellerDD commented Mar 15, 2021 via email

@smuellerDD
Copy link
Owner

The new code has been released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants