commit:     4bcbeed54876ceff3d0ca315352152997c61c4b5
Author:     Gokturk Yuksek <gokturk <AT> binghamton <DOT> edu>
AuthorDate: Tue Sep 22 05:46:55 2015 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Tue Sep 22 08:52:50 2015 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=4bcbeed5

Add a mdev rule to rename hw_random to hwrng

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
(#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. Utilize 'mdev.conf' to manually rename 'hw_random' to
'hwrng'.

[1] http://marc.info/?l=linux-crypto-vger&m=144249767024990&w=2

Signed-off-by: Gokturk Yuksek <gokturk <AT> binghamton.edu>

 mdev/mdev.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mdev/mdev.conf b/mdev/mdev.conf
index 7bca988..9e8efd0 100644
--- a/mdev/mdev.conf
+++ b/mdev/mdev.conf
@@ -1,2 +1,3 @@
 sd[a-z].*       0:0 660 @/etc/mdev/helpers/storage-device
 vd[a-z].*       0:0 660 @/etc/mdev/helpers/storage-device
+hw_random       0:0 600 =hwrng

Reply via email to