lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun,  1 Jan 2012 17:45:59 -0500
From:	Edward Donovan <edward.donovan@...ble.net>
To:	tglx@...utronix.de, torvalds@...ux-foundation.org
Cc:	alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org
Subject: [PATCH v2] genirq: better error messages for spurious IRQs

We have more information than we've been giving the user, when an
IRQ goes unhandled.  Working with bug reports, I've seen plenty
of users asking why the kernel is suggesting 'irqpoll' when
they're already using it.  So, when an IRQ is disabled, this
patch just checks whether 'irqfixup' or 'irqpoll' were called,
and has three versions of the error message, accordingly:

- 'irqfixup' eats less resources, and the docs recommend trying
it first.  Now the code does the same.

- If that does not help, recommend 'irqpoll'.

- If 'irqpoll' has not helped, most likely the firmware is too
broken; say so.  Won't try to list every alternative case here.

(For clarity's sake, I'd prefer to change "nobody cared" to "not
handled", but I wouldn't want to cut the tie to archived
discussions.  So I left the former, in parentheses, once.  Not
sure just what's best.)

Signed-off-by: Edward Donovan <edward.donovan@...ble.net>
---
 kernel/irq/spurious.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index dc813a9..bd2159e 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -194,9 +194,18 @@ __report_bad_irq(unsigned int irq, struct irq_desc *desc,
 	if (bad_action_ret(action_ret)) {
 		printk(KERN_ERR "irq event %d: bogus return value %x\n",
 				irq, action_ret);
+	} else if (irqfixup == 1) {
+		printk(KERN_ERR "irq %d not handled, even with \"irqfixup\": "
+				"try booting with the \"irqpoll\" option.\n",
+				irq);
+	} else if (irqfixup == 2) {
+		printk(KERN_ERR "irq %d not handled, even with \"irqpoll\": "
+				"most likely the firwmare is too broken.\n",
+				irq);
 	} else {
-		printk(KERN_ERR "irq %d: nobody cared (try booting with "
-				"the \"irqpoll\" option)\n", irq);
+		printk(KERN_ERR "irq %d not handled (nobody cared): try "
+				"booting with the \"irqfixup\" option.\n",
+				irq);
 	}
 	dump_stack();
 	printk(KERN_ERR "handlers:\n");
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ