When mdev is invoked to populate /dev (mdev -s), it creates the node for the hardware random number generator (major 10, minor 183) with the incorrect name. This is because the linux kernel uses 'hw_random' for the /sys entry and 'hwrng' for the /dev entry. As a result, when mdev scans /sys/class, it finds the entry '/sys/class/misc/hw_random/dev' and creates /dev/hw_random. When combined with the kernel option 'CONFIG_DEVTMPFS', this results in having two nodes under /dev (namely 'hw_random' and 'hwrng) that point to the same device. This currently breaks sys-apps/rng-tools (bug 481254). The use of 'hw_random' has been obselete for 6 years [1]. Kernel exposes no mechanism for mdev to figure out the node name automatically. I propose a patch that utilizes 'mdev.conf' to manually rename 'hw_random' to 'hwrng'. [1] http://marc.info/?l=linux-crypto-vger&m=144249767024990&w=2 Reproducible: Always
Created attachment 412510 [details, diff] Proposed fix Applied on top of 59bdd8e568cd9d084da4c8fc9590913d7e84f16e.
Corresponding pull request: https://github.com/gentoo/genkernel/pull/1
Nice fix. This is in git: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=4bcbeed54876ceff3d0ca315352152997c61c4b5
I think this is included in v3.4.52.4 (e41248f3b0dd6be529abf2c08aec4971e2d751bc) which is in the tree now. Any reason to keep this open?
i pushed a fix in upstream mdev.conf too https://git.busybox.net/busybox/commit/?id=2098c3511cfa0e79c5d6e19e41a74ef19bcf91af