Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull random subsystem patches from Ted Ts'o: "This patch series contains a major revamp of how we collect entropy from interrupts for /dev/random and /dev/urandom. The goal is to addresses weaknesses discussed in the paper "Mining your Ps and Qs: Detection of Widespread Weak Keys in Network Devices", by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman, which will be published in the Proceedings of the 21st Usenix Security Symposium, August 2012. (See https://factorable.net for more information and an extended version of the paper.)" Fix up trivial conflicts due to nearby changes in drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c} * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits) random: mix in architectural randomness in extract_buf() dmi: Feed DMI table to /dev/random driver random: Add comment to random_initialize() random: final removal of IRQF_SAMPLE_RANDOM um: remove IRQF_SAMPLE_RANDOM which is now a no-op sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op ...
这个提交包含在:
@@ -288,8 +288,7 @@ palmz71_gpio_setup(int early)
|
||||
}
|
||||
gpio_direction_input(PALMZ71_USBDETECT_GPIO);
|
||||
if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
|
||||
palmz71_powercable, IRQF_SAMPLE_RANDOM,
|
||||
"palmz71-cable", NULL))
|
||||
palmz71_powercable, 0, "palmz71-cable", NULL))
|
||||
printk(KERN_ERR
|
||||
"IRQ request for power cable failed!\n");
|
||||
palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL);
|
||||
|
@@ -456,7 +456,7 @@ static int lubbock_mci_init(struct device *dev,
|
||||
init_timer(&mmc_timer);
|
||||
mmc_timer.data = (unsigned long) data;
|
||||
return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
|
||||
IRQF_SAMPLE_RANDOM, "lubbock-sd-detect", data);
|
||||
0, "lubbock-sd-detect", data);
|
||||
}
|
||||
|
||||
static int lubbock_mci_get_ro(struct device *dev)
|
||||
|
@@ -633,9 +633,8 @@ static struct platform_device bq24022 = {
|
||||
static int magician_mci_init(struct device *dev,
|
||||
irq_handler_t detect_irq, void *data)
|
||||
{
|
||||
return request_irq(IRQ_MAGICIAN_SD, detect_irq,
|
||||
IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
|
||||
"mmc card detect", data);
|
||||
return request_irq(IRQ_MAGICIAN_SD, detect_irq, IRQF_DISABLED,
|
||||
"mmc card detect", data);
|
||||
}
|
||||
|
||||
static void magician_mci_exit(struct device *dev, void *data)
|
||||
|
@@ -332,8 +332,8 @@ static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int,
|
||||
int err;
|
||||
|
||||
err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
|
||||
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_SAMPLE_RANDOM,
|
||||
"MMC card detect", data);
|
||||
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
||||
"MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request"
|
||||
"MMC card detect IRQ\n");
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/random.h> /* for rand_initialize_irq() */
|
||||
#include <linux/signal.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/threads.h>
|
||||
|
@@ -1250,14 +1250,12 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
|
||||
snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
|
||||
snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
|
||||
|
||||
err = request_irq(lp->cfg.rx_irq, ldc_rx,
|
||||
IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
|
||||
err = request_irq(lp->cfg.rx_irq, ldc_rx, IRQF_DISABLED,
|
||||
lp->rx_irq_name, lp);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = request_irq(lp->cfg.tx_irq, ldc_tx,
|
||||
IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
|
||||
err = request_irq(lp->cfg.tx_irq, ldc_tx, IRQF_DISABLED,
|
||||
lp->tx_irq_name, lp);
|
||||
if (err) {
|
||||
free_irq(lp->cfg.rx_irq, lp);
|
||||
|
@@ -362,18 +362,18 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
|
||||
int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
|
||||
{
|
||||
const struct line_driver *driver = line->driver;
|
||||
int err = 0, flags = IRQF_SHARED | IRQF_SAMPLE_RANDOM;
|
||||
int err = 0;
|
||||
|
||||
if (input)
|
||||
err = um_request_irq(driver->read_irq, fd, IRQ_READ,
|
||||
line_interrupt, flags,
|
||||
driver->read_irq_name, data);
|
||||
line_interrupt, IRQF_SHARED,
|
||||
driver->read_irq_name, data);
|
||||
if (err)
|
||||
return err;
|
||||
if (output)
|
||||
err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
|
||||
line_write_interrupt, flags,
|
||||
driver->write_irq_name, data);
|
||||
line_write_interrupt, IRQF_SHARED,
|
||||
driver->write_irq_name, data);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -779,8 +779,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty,
|
||||
.stack = stack });
|
||||
|
||||
if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
|
||||
IRQF_SHARED | IRQF_SAMPLE_RANDOM,
|
||||
"winch", winch) < 0) {
|
||||
IRQF_SHARED, "winch", winch) < 0) {
|
||||
printk(KERN_ERR "register_winch_irq - failed to register "
|
||||
"IRQ\n");
|
||||
goto out_free;
|
||||
|
@@ -774,8 +774,7 @@ static int __init mconsole_init(void)
|
||||
register_reboot_notifier(&reboot_notifier);
|
||||
|
||||
err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
|
||||
IRQF_SHARED | IRQF_SAMPLE_RANDOM,
|
||||
"mconsole", (void *)sock);
|
||||
IRQF_SHARED, "mconsole", (void *)sock);
|
||||
if (err) {
|
||||
printk(KERN_ERR "Failed to get IRQ for management console\n");
|
||||
goto out;
|
||||
|
@@ -100,8 +100,7 @@ static int port_accept(struct port_list *port)
|
||||
.port = port });
|
||||
|
||||
if (um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt,
|
||||
IRQF_SHARED | IRQF_SAMPLE_RANDOM,
|
||||
"telnetd", conn)) {
|
||||
IRQF_SHARED, "telnetd", conn)) {
|
||||
printk(KERN_ERR "port_accept : failed to get IRQ for "
|
||||
"telnetd\n");
|
||||
goto out_free;
|
||||
@@ -184,8 +183,7 @@ void *port_data(int port_num)
|
||||
}
|
||||
|
||||
if (um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt,
|
||||
IRQF_SHARED | IRQF_SAMPLE_RANDOM,
|
||||
"port", port)) {
|
||||
IRQF_SHARED, "port", port)) {
|
||||
printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
|
||||
goto out_close;
|
||||
}
|
||||
|
@@ -131,8 +131,7 @@ static int __init rng_init (void)
|
||||
random_fd = err;
|
||||
|
||||
err = um_request_irq(RANDOM_IRQ, random_fd, IRQ_READ, random_interrupt,
|
||||
IRQF_SAMPLE_RANDOM, "random",
|
||||
NULL);
|
||||
0, "random", NULL);
|
||||
if (err)
|
||||
goto err_out_cleanup_hw;
|
||||
|
||||
|
@@ -50,8 +50,7 @@ int xterm_fd(int socket, int *pid_out)
|
||||
init_completion(&data->ready);
|
||||
|
||||
err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt,
|
||||
IRQF_SHARED | IRQF_SAMPLE_RANDOM,
|
||||
"xterm", data);
|
||||
IRQF_SHARED, "xterm", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
|
||||
"err = %d\n", err);
|
||||
|
@@ -25,8 +25,7 @@ int write_sigio_irq(int fd)
|
||||
int err;
|
||||
|
||||
err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
|
||||
IRQF_SAMPLE_RANDOM, "write sigio",
|
||||
NULL);
|
||||
0, "write sigio", NULL);
|
||||
if (err) {
|
||||
printk(KERN_ERR "write_sigio_irq : um_request_irq failed, "
|
||||
"err = %d\n", err);
|
||||
|
在新工单中引用
屏蔽一个用户