Code Monkey home page Code Monkey logo

Comments (5)

Mingli-Yu avatar Mingli-Yu commented on August 16, 2024

It breaks here in init_drng_entropy_source function of rngd_rdrand.c.
if (!(info.ecx & features_ecx1_rdrand))
return 1;

from rng-tools.

nhorman avatar nhorman commented on August 16, 2024

Thats working as designed. If that check fails it indicates that your cpu doesn't support, or isn't exposing the rdrand instruction, and so the rdrand entropy source cannot work

from rng-tools.

Mingli-Yu avatar Mingli-Yu commented on August 16, 2024

Thanks very much for your info, then how to make the cpu support the function as I run the service in qemu env.
And as the message indicates "[rdrand]: Initialization Failed", but the service started successfully via "systemctl status rngd".

from rng-tools.

nhorman avatar nhorman commented on August 16, 2024

you probably cant enable rdrand. If your hardware doesn't support the instruction, theres nothing you can do, and if it does, you will need access to the host so as to run your hypervisor process with the appropriate rdrand cpu flag enabled.

However, its important to note that this isn't in and of itself a problem. rngd supports several different entropy sources, of which rdrand is only one. You have other sources (specficially jitter) which is operational, and so allows rngd to function properly. The failure to initalize rdrand isn't fatal to your operation.

from rng-tools.

Mingli-Yu avatar Mingli-Yu commented on August 16, 2024

Thanks nhorman very much for your explanation!
Through the rngd status as below, the rdrand doesn't work as it indicates "Initialization Failed", but at least one entropy source such jitter works, so the rngd works as expected though one message "[rdrand]: Initialization Failed", do I understand correctly? If so, it's better change the message a little to guide people, otherwise we thought there is something wrong #84.

systemctl status rngd

rngd.service - Hardware RNG Entropy Gatherer Daemon
Loaded: loaded (/lib/systemd/system/rngd.service; enabled; vendor preset: >
Active: active (running) since Tue 2020-02-25 05:08:11 UTC; 42min ago
Main PID: 133 (rngd)
Tasks: 2 (limit: 3591)
Memory: 1.0M
CGroup: /system.slice/rngd.service
`-133 /usr/sbin/rngd -f -r /dev/hwrng

Feb 25 05:08:14 qemux86-64 rngd[133]: Initializing available sources
Feb 25 05:08:14 qemux86-64 rngd[133]: [hwrng ]: Initialized
Feb 25 05:08:14 qemux86-64 rngd[133]: [rdrand]: Initialization Failed
Feb 25 05:08:14 qemux86-64 rngd[133]: [jitter]: Initializing AES buffer
Feb 25 05:08:31 qemux86-64 rngd[133]: [jitter]: Enabling JITTER rng support
Feb 25 05:08:39 qemux86-64 rngd[133]: [jitter]: Initialized
Warning: Journal has been rotated since unit was started. Log output is incompl

from rng-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.