Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysctl on Pinebook never finishes



> Date: Sat, 14 May 2022 14:20:59 +0000
> From: John Klos <john%ziaspace.com@localhost>
> 
> Does anyone know why sysctl -a never completes on a Pinebook (not Pro
> - first gen) running -current from today?
> 
> sysctl -a
> ...
> hw.drm2.radeon_no_wb = 0
> hw.pwmbacklight0.levels = 0 5 10 15 20 30 40 55 70 85 100
> hw.pwmbacklight0.level = 10
> ...
> 
> SIGINFO shows:
> [ 124.5394678] load: 0.62  cmd: sysctl 1973 [sun8isy] 0.09u 0.05s 0% 1876k
> 
> I see sun8isy has to do with sun8i_crypto, so I wondered if this was a
> lack of entropy issue. After adding entropy, the kernel emitted:
> 
> [ 46451.878690] sun8icrypto0: no free channels
> 
> Then, sysctl -a works. PR?

Should be fixed in sun8i_crypto.c 1.31.

For the record: this is not related to entropy.  This was just a bug
in a driver.  The driver happens to be the driver for the crypto
engine via the hw.sun8icrypto0.rng sysctl knob which draws from the
HWRNG.

The crypto engine's HWRNG is used for kernel entropy, but the sysctl
is for reading from the crypto engine's HWRNG directly to study it.
The bug affected all crypto engine operations -- the same bug would
have affected any use of opencrypto(9) or /dev/crypto, e.g.  for
IPsec, to do crypto operations using the same channels as the HWRNG.

It is a coincidence that it started failing immediately with the
message you saw after you added entropy -- there are only eight
channels in the crypto engine, and the bug meant that tasks would
never complete on any channel, so it only takes eight attempts for new
attempts to start failing immediately with no free channels.


Home | Main Index | Thread Index | Old Index