Comments (4)
well, I'm not sure what to tell you.
rng-tools started using libsysfs when it was first developed and its always worked just fine. Of course the only thing we've used it for was to lookup sysfs attributes directly (no following links etc). So in my opinion its perfectly safe, and all the distributions that rng-tools ships with also ship libsysfs. While it may be true that the library has shortcomings, I think its a bit disingenuous for the kernel documentation to assert that no one should use it.
I understand if you don't want to introduce libsysfs into your environment, but currently there is no option to exclude it from the build. That said, its only used for one entropy source in rngd (the hwrng source), and the libraries use is restricted to two calls (sysfs_open_attribute and sysfs_close_attribute). Both of those are really just wrapper calls to a sequence of open/read/close calls. So if you were so inclined, I'd be happy to review/accept a patch that implements that functionality directly and replaces the library calls to those internal implementations. Then we could remove the dependency.
from rng-tools.
Trying to build rng-tools, ./configure complain about libsysfs missing
configure: No Jitterentropy libary found
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libcurl... yes
checking for libxml-2.0... yes
checking for openssl... yes
checking for libp11... yes
checking for library containing sysfs_get_mnt_path... no
configure: error: libsysfs is required
Obviously I could import/config libsysfs (diagnostic toosl, 2.1.0), but kernel
guys are saying libsysfs is a "no, no"
https://www.mjmwired.net/kernel/Documentation/sysfs-rules.tx
Do not use libsysfs
It makes assumptions about sysfs which are not true. Its API does not offer any abstraction, it exposes all the kernel driver-core implementation details in its own API.
So I am reluctant to add libsysfs.
How I can have configure to bypass the libsysfs check? is it possible? is it wise?
from rng-tools.
Agreed, found the "kernel comment" rather mean (easy discarding of other's work, not nice)
So I added libsysfs and rngd is working fine, thanks for your help.
I am using rngd to reduce linux-4.+++ booting delay (cnrg).
Note: if indeed libsysfs is "useless" (kernel guys) or "restricted" (you), may be the library shouldn't be used. I checked if I can remove it from rng-tools, but I am not competent enough (no knowledge about rngd principle and intrinsic) to do a clean job.
Suggestions:
when you start rngd, it is in verbose mode by default (before entering in daemon mode)
./rngd -r /dev/urandom
Initalizing available sources
Initalizing entropy source hwrng
Failed to init entropy source rdrand
PKCS11 Engine /usr/lib64/opensc-pkcs11.so Error: No such file or directory
This verbose mode can be cancel by "-q",.... problem...
without -q , user believe rngd is not working while it is entering in background (and working fine)
with -q, there is no message if rngd is NOT going in background (the message "unable to adjust write_wakeup_threshold" is not displayed).
This is bad in term of functionality, if rngd is not able to reach a working state (fatal error) a message should be displayed, or "proceeding messages" should be displayed only via a verbose mode (-v) or debug mode (-d).
My 2 cents.
from rng-tools.
I'm not sure what you're saying, in quiet mode, output messages are suppressed, so if there are failures, you won't see messages, and thats by design (its the purpose of -q). If you're using that flag, you determine the status of rngd by its exit code, which systemd does. If you don't use -q, you get informational messages about which entropy sources are available and working, and are expected to understand that rngd has multiple sources and, if you don't expressly disable them and they fail to initialize (for instance, if the underlying hardware is unavailable), then thats an expected failure you can ignore.
from rng-tools.
Related Issues (20)
- v6.15 build fails with jitterentropy 3.4 HOT 4
- rng-tools stopped to build with jitterentropy v3.4.0 HOT 16
- kernel handling of hwrng versus rngd HOT 3
- [6.14] rngd --list not showing full list and hangs HOT 31
- rngd and the LRNG HOT 14
- rngtestjitter.sh failures after recent changes HOT 23
- building without qrypt fails HOT 1
- Is it useful with kernel 5.18 (new rng blake2 output - entropy_avail always equal to 256)? HOT 1
- rngd fails with gcrypt library HOT 2
- 'rngd -l' | sources associated to an incorrect index HOT 1
- Add mention of kernel version when referring to it in documentation HOT 6
- External tool as entropy source for Jetson devices HOT 3
- Consider a new release for compatibility with jitterentropy-3.4 HOT 1
- Is it possible to add an option to capture the random data from the source to a file rather than adding it to the kernel entropy pool ? HOT 2
- 6.16: test suie runs forever HOT 2
- Change poolsize definition for recent Linux kernels? HOT 5
- Socket interface for hardware TRNGs HOT 7
- JITTER_OPT_TIMEOUT default value is too low HOT 4
- Coarse mixing of multiple entropy sources HOT 3
- xread_jitter bails out with EWOULDBLOCK in init_jitter_entropy_source (rngd_jitter.c) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rng-tools.