From e296d3b4b094d3120619bc6d1417dee6d959474d Mon Sep 17 00:00:00 2001 From: Gokturk Yuksek Date: Tue, 22 Sep 2015 01:46:55 -0400 Subject: [PATCH] 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 --- 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 -- 2.4.9