Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: TrueRNG problem on gentoo #934

    trubicoid
    Member

    not sure what you mean, because the problem is that I can’t run rngd with start-stop-daemon, so the first command is not useful

    let’s try to bind it to another cgroup started by openrc, I’ve chosen metalog and everything works:

    echo $$ > /sys/fs/cgroup/openrc/metalog/tasks
    # cat /proc/self/cgroup
    7:blkio:/
    6:freezer:/
    5:devices:/
    4:cpuacct:/
    3:cpu:/
    2:cpuset:/
    1:name=openrc:/metalog
    ls -l /dev/ttyACM0; dd iflag=fullblock if=/dev/ttyACM0 bs=64 count=1 | od
    crw-rw---- 1 root uucp 166, 0 Sep  6 01:46 /dev/ttyACM0
    0000000 027221 177664 037012 170766 104447 105175 105241 011203
    0000020 005052 163532 120074 006217 016672 010742 160602 037067
    0000040 004256 003130 027505 047334 171510 126767 056415 015250
    0000060 026661 157325 104115 065264 153776 150571 014457 063023
    0000100
    1+0 records in
    1+0 records out
    64 bytes (64 B) copied, 0.0211215 s, 3.0 kB/s

    and

    # find /sys/fs/cgroup -name devices.list -ls -exec cat '{}' \;
        18    0 -r--r--r--   1 root     root            0 Sep 12 17:53 /sys/fs/cgroup/devices/openrc_rngd/devices.list
    a *:* rwm
        10    0 -r--r--r--   1 root     root            0 Sep 12 17:53 /sys/fs/cgroup/devices/devices.list
    a *:* rwm

    where the rngd permissions come from your first solution

    I can also disable rc_controller_cgroups=”NO” in /etc/rc.conf, but nothing changes.
    I can even rebuild kernel without cgroups, but I believe the problem is not related to cgroups. It is in the way start-stop-daemon handels tty line parameters.

    in reply to: TrueRNG problem on gentoo #932

    trubicoid
    Member

    I think it is not a problem of accessing the device. I tried your fix and it does not help.

    The problem is with

    start-stop-daemon --start --exec /usr/sbin/rngd --pidfile /var/run/rngd.pid --wait 1000 -- --pid-file /var/run/rngd.pid --foreground --random-step 64 --fill-watermark 2048 --rng-device /dev/hwrng

    While manually without start-stop-daemon it works

    /usr/sbin/rngd --pid-file /var/run/rngd.pid --foreground --random-step 64 --fill-watermark 2048 --rng-device /dev/hwrng

    The –foreground may be changed for –background.

    Looks like start-stop-daemon sees in the arguments a tty device and automagically connects the process to that tty instead of leaving it unconnected.

    Then no data from ttyACM0 go to rngd and it complains and stops

    what version on openrc do you have on centos? mine is 0.12.4

    BTW the forum is back again.

    in reply to: TrueRNG v2 Info? #925

    trubicoid
    Member

    Mine is 1.02, what does it mean?

    lsusb -v -d 04d8:f5fe | grep bcdDevice
      bcdDevice            1.02
Viewing 3 posts - 1 through 3 (of 3 total)