aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 22:07:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 22:07:42 -0400
commit3e9a97082fa639394e905e1fc4a0a7f719ca7644 (patch)
tree9985cfa26e0597128eae03a2ee7e4614efea571f /arch
parent941c8726e4e737e74d418ccec3d8e7b946a65541 (diff)
parentd2e7c96af1e54b507ae2a6a7dd2baf588417a7e5 (diff)
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 ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c3
-rw-r--r--arch/arm/mach-pxa/lubbock.c2
-rw-r--r--arch/arm/mach-pxa/magician.c5
-rw-r--r--arch/arm/mach-pxa/trizeps4.c4
-rw-r--r--arch/ia64/kernel/irq_ia64.c1
-rw-r--r--arch/sparc/kernel/ldc.c6
-rw-r--r--arch/um/drivers/line.c13
-rw-r--r--arch/um/drivers/mconsole_kern.c3
-rw-r--r--arch/um/drivers/port_kern.c6
-rw-r--r--arch/um/drivers/random.c3
-rw-r--r--arch/um/drivers/xterm_kern.c3
-rw-r--r--arch/um/kernel/sigio.c3
12 files changed, 20 insertions, 32 deletions
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index cc71a26723ef..355980321c2d 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -288,8 +288,7 @@ palmz71_gpio_setup(int early)
288 } 288 }
289 gpio_direction_input(PALMZ71_USBDETECT_GPIO); 289 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
291 palmz71_powercable, IRQF_SAMPLE_RANDOM, 291 palmz71_powercable, 0, "palmz71-cable", NULL))
292 "palmz71-cable", NULL))
293 printk(KERN_ERR 292 printk(KERN_ERR
294 "IRQ request for power cable failed!\n"); 293 "IRQ request for power cable failed!\n");
295 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL); 294 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL);
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 6bb3f47b1f14..0ca0db787903 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -456,7 +456,7 @@ static int lubbock_mci_init(struct device *dev,
456 init_timer(&mmc_timer); 456 init_timer(&mmc_timer);
457 mmc_timer.data = (unsigned long) data; 457 mmc_timer.data = (unsigned long) data;
458 return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int, 458 return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
459 IRQF_SAMPLE_RANDOM, "lubbock-sd-detect", data); 459 0, "lubbock-sd-detect", data);
460} 460}
461 461
462static int lubbock_mci_get_ro(struct device *dev) 462static int lubbock_mci_get_ro(struct device *dev)
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 2db697cd2b4e..39561dcf65f2 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -633,9 +633,8 @@ static struct platform_device bq24022 = {
633static int magician_mci_init(struct device *dev, 633static int magician_mci_init(struct device *dev,
634 irq_handler_t detect_irq, void *data) 634 irq_handler_t detect_irq, void *data)
635{ 635{
636 return request_irq(IRQ_MAGICIAN_SD, detect_irq, 636 return request_irq(IRQ_MAGICIAN_SD, detect_irq, IRQF_DISABLED,
637 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, 637 "mmc card detect", data);
638 "mmc card detect", data);
639} 638}
640 639
641static void magician_mci_exit(struct device *dev, void *data) 640static void magician_mci_exit(struct device *dev, void *data)
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 2b6ac00b2cd9..166dd32cc1d3 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -332,8 +332,8 @@ static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int,
332 int err; 332 int err;
333 333
334 err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int, 334 err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
335 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_SAMPLE_RANDOM, 335 IRQF_DISABLED | IRQF_TRIGGER_RISING,
336 "MMC card detect", data); 336 "MMC card detect", data);
337 if (err) { 337 if (err) {
338 printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request" 338 printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request"
339 "MMC card detect IRQ\n"); 339 "MMC card detect IRQ\n");
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 5c3e0888265a..1034884b77da 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -23,7 +23,6 @@
23#include <linux/ioport.h> 23#include <linux/ioport.h>
24#include <linux/kernel_stat.h> 24#include <linux/kernel_stat.h>
25#include <linux/ptrace.h> 25#include <linux/ptrace.h>
26#include <linux/random.h> /* for rand_initialize_irq() */
27#include <linux/signal.h> 26#include <linux/signal.h>
28#include <linux/smp.h> 27#include <linux/smp.h>
29#include <linux/threads.h> 28#include <linux/threads.h>
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 435e406fdec3..81d92fc9983b 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -1250,14 +1250,12 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
1250 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); 1250 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
1251 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); 1251 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
1252 1252
1253 err = request_irq(lp->cfg.rx_irq, ldc_rx, 1253 err = request_irq(lp->cfg.rx_irq, ldc_rx, IRQF_DISABLED,
1254 IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
1255 lp->rx_irq_name, lp); 1254 lp->rx_irq_name, lp);
1256 if (err) 1255 if (err)
1257 return err; 1256 return err;
1258 1257
1259 err = request_irq(lp->cfg.tx_irq, ldc_tx, 1258 err = request_irq(lp->cfg.tx_irq, ldc_tx, IRQF_DISABLED,
1260 IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
1261 lp->tx_irq_name, lp); 1259 lp->tx_irq_name, lp);
1262 if (err) { 1260 if (err) {
1263 free_irq(lp->cfg.rx_irq, lp); 1261 free_irq(lp->cfg.rx_irq, lp);
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index acfd0e0fd0c9..ac9d25c8dc01 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -362,18 +362,18 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
362int line_setup_irq(int fd, int input, int output, struct line *line, void *data) 362int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
363{ 363{
364 const struct line_driver *driver = line->driver; 364 const struct line_driver *driver = line->driver;
365 int err = 0, flags = IRQF_SHARED | IRQF_SAMPLE_RANDOM; 365 int err = 0;
366 366
367 if (input) 367 if (input)
368 err = um_request_irq(driver->read_irq, fd, IRQ_READ, 368 err = um_request_irq(driver->read_irq, fd, IRQ_READ,
369 line_interrupt, flags, 369 line_interrupt, IRQF_SHARED,
370 driver->read_irq_name, data); 370 driver->read_irq_name, data);
371 if (err) 371 if (err)
372 return err; 372 return err;
373 if (output) 373 if (output)
374 err = um_request_irq(driver->write_irq, fd, IRQ_WRITE, 374 err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
375 line_write_interrupt, flags, 375 line_write_interrupt, IRQF_SHARED,
376 driver->write_irq_name, data); 376 driver->write_irq_name, data);
377 return err; 377 return err;
378} 378}
379 379
@@ -779,8 +779,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty,
779 .stack = stack }); 779 .stack = stack });
780 780
781 if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, 781 if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
782 IRQF_SHARED | IRQF_SAMPLE_RANDOM, 782 IRQF_SHARED, "winch", winch) < 0) {
783 "winch", winch) < 0) {
784 printk(KERN_ERR "register_winch_irq - failed to register " 783 printk(KERN_ERR "register_winch_irq - failed to register "
785 "IRQ\n"); 784 "IRQ\n");
786 goto out_free; 785 goto out_free;
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 43b39d61b538..664a60e8dfb4 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -774,8 +774,7 @@ static int __init mconsole_init(void)
774 register_reboot_notifier(&reboot_notifier); 774 register_reboot_notifier(&reboot_notifier);
775 775
776 err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt, 776 err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
777 IRQF_SHARED | IRQF_SAMPLE_RANDOM, 777 IRQF_SHARED, "mconsole", (void *)sock);
778 "mconsole", (void *)sock);
779 if (err) { 778 if (err) {
780 printk(KERN_ERR "Failed to get IRQ for management console\n"); 779 printk(KERN_ERR "Failed to get IRQ for management console\n");
781 goto out; 780 goto out;
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index 11866ffd45a9..1d83d50236e1 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -100,8 +100,7 @@ static int port_accept(struct port_list *port)
100 .port = port }); 100 .port = port });
101 101
102 if (um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, 102 if (um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt,
103 IRQF_SHARED | IRQF_SAMPLE_RANDOM, 103 IRQF_SHARED, "telnetd", conn)) {
104 "telnetd", conn)) {
105 printk(KERN_ERR "port_accept : failed to get IRQ for " 104 printk(KERN_ERR "port_accept : failed to get IRQ for "
106 "telnetd\n"); 105 "telnetd\n");
107 goto out_free; 106 goto out_free;
@@ -184,8 +183,7 @@ void *port_data(int port_num)
184 } 183 }
185 184
186 if (um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, 185 if (um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt,
187 IRQF_SHARED | IRQF_SAMPLE_RANDOM, 186 IRQF_SHARED, "port", port)) {
188 "port", port)) {
189 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); 187 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
190 goto out_close; 188 goto out_close;
191 } 189 }
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index b25296e6218a..e32c6aa6396f 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -131,8 +131,7 @@ static int __init rng_init (void)
131 random_fd = err; 131 random_fd = err;
132 132
133 err = um_request_irq(RANDOM_IRQ, random_fd, IRQ_READ, random_interrupt, 133 err = um_request_irq(RANDOM_IRQ, random_fd, IRQ_READ, random_interrupt,
134 IRQF_SAMPLE_RANDOM, "random", 134 0, "random", NULL);
135 NULL);
136 if (err) 135 if (err)
137 goto err_out_cleanup_hw; 136 goto err_out_cleanup_hw;
138 137
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index b68bbe269e01..e3031e69445d 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -50,8 +50,7 @@ int xterm_fd(int socket, int *pid_out)
50 init_completion(&data->ready); 50 init_completion(&data->ready);
51 51
52 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, 52 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt,
53 IRQF_SHARED | IRQF_SAMPLE_RANDOM, 53 IRQF_SHARED, "xterm", data);
54 "xterm", data);
55 if (err) { 54 if (err) {
56 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " 55 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
57 "err = %d\n", err); 56 "err = %d\n", err);
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c
index 2a1639255763..c88211139a51 100644
--- a/arch/um/kernel/sigio.c
+++ b/arch/um/kernel/sigio.c
@@ -25,8 +25,7 @@ int write_sigio_irq(int fd)
25 int err; 25 int err;
26 26
27 err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, 27 err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
28 IRQF_SAMPLE_RANDOM, "write sigio", 28 0, "write sigio", NULL);
29 NULL);
30 if (err) { 29 if (err) {
31 printk(KERN_ERR "write_sigio_irq : um_request_irq failed, " 30 printk(KERN_ERR "write_sigio_irq : um_request_irq failed, "
32 "err = %d\n", err); 31 "err = %d\n", err);