Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
RANDOM_KEYBOARD and RANDOM_MOUSE can be masked away by sysctls. What is the need to remove them this way?
If your goal is to permit explicitly enabling or disabling random sources at compile time, I suggest going the KTR route, and having a RANDOM_COMPILE mask that defaults to everything enabled, allowing one to configure the random mask in the kernel config. This would centralize all this logic rather than having #ifdefs scattered around for each source.
This is following what's already been established for RANDOM_ENABLE_UMA and RANDOM_ENABLE_ETHER. If that approach is wrong, then all of these enables should be re-architectured. Right now I'm trying to follow the RANDOM_ENABLE_ETHER/RANDOM_ENABLE_UMA precedent for Juniper Networks downstream needs.
looks good.
Future improvement would be to move these enable options to a opt_random.h or something, and have that included by sys/random.h