]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/net: Remove IRQF_SAMPLE_RANDOM flag from network drivers
authorJavier Martinez Canillas <martinez.javier@gmail.com>
Mon, 28 Mar 2011 16:27:31 +0000 (16:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Mar 2011 05:28:14 +0000 (22:28 -0700)
commitdf4f1548e3718f542b9c814c2957f3a4e4643fc5
tree7a05c3726db3f95e5efe6bc6314deafa27884158
parentf06dc00e82197f7206cb6836b746e48d9be70453
drivers/net: Remove IRQF_SAMPLE_RANDOM flag from network drivers

The IRQF_SAMPLE_RANDOM flag is marked as deprecated and will be removed.

Every input point to the kernel's entropy pool have to better document the
type of entropy source it is.

drivers/char/random.c now implements a set of interfaces that can be used for
devices to collect enviromental noise. IRQF_SAMPLE_RANDOM will be replaced
with these add_*_randomness exported functions.

Network drivers are not a good source of entropy. They use as a source of
entropy essentially a remote host. Which means that the source of entropy can
be potentially controlled by an attacker. Also, with heavy workloads the
entropy decreases due to less hardware interrupts happening thanks to irq
mitigation and NAPI.

If a system relies in its network interface as a entropy source it has a false
sense of security. Systems that don't have devices whose drivers are good
sources of entropy, should either use a hardware random number generator or
feed the kernel's entropy pool from userspace using other sources of entropy
such as EGD, video_entropyd, timer_entropyd and audio-entropyd.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/atlx/atl1.c
drivers/net/bcm63xx_enet.c
drivers/net/cris/eth_v10.c
drivers/net/ibmlana.c
drivers/net/macb.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/niu.c
drivers/net/qla3xxx.c
drivers/net/tg3.c
drivers/net/xen-netfront.c