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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 26 Oct 2014 16:06:28 +0000 (GMT)
From:	"Maciej W. Rozycki" <>
To:	Thomas Gleixner <>,
	Ingo Molnar <>,
	"H. Peter Anvin" <>,
Subject: [PATCH] x86: Fix XT-PIC-XT-PIC in /proc/interrupts

Fix duplicate XT-PIC seen in /proc/interrupts on x86 systems that make 
use of 8259A Programmable Interrupt Controllers.  Specifically convert 
output like this:

  0:      76573    XT-PIC-XT-PIC    timer
  1:         11    XT-PIC-XT-PIC    i8042
  2:          0    XT-PIC-XT-PIC    cascade
  4:          8    XT-PIC-XT-PIC    serial
  6:          3    XT-PIC-XT-PIC    floppy
  7:          0    XT-PIC-XT-PIC    parport0
  8:          1    XT-PIC-XT-PIC    rtc0
 10:        448    XT-PIC-XT-PIC    fddi0
 12:         23    XT-PIC-XT-PIC    eth0
 14:       2464    XT-PIC-XT-PIC    ide0
NMI:          0   Non-maskable interrupts
ERR:          0

to one like this:

  0:     122033    XT-PIC  timer
  1:         11    XT-PIC  i8042
  2:          0    XT-PIC  cascade
  4:          8    XT-PIC  serial
  6:          3    XT-PIC  floppy
  7:          0    XT-PIC  parport0
  8:          1    XT-PIC  rtc0
 10:        145    XT-PIC  fddi0
 12:         31    XT-PIC  eth0
 14:       2245    XT-PIC  ide0
NMI:          0   Non-maskable interrupts
ERR:          0

that is one like we used to have from ~2.2 till it was changed sometime.

The rationale is there is no value in this duplicate information, it 
merely clutters output and looks ugly.  We only have one handler for 
8259A interrupts so there is no need to give it a name separate from the 
name already given to irq_chip.

We could define meaningful names for handlers based on bits in the ELCR 
register on systems that have it or the value of the LTIM bit we use in 
ICW1 otherwise (hardcoded to 0 though with MCA support gone), to tell 
edge-triggered and level-triggered inputs apart.  While that information 
does not affect 8259A interrupt handlers it could help people determine 
which lines are shareable and which are not.  That is material for a 
separate change though.

Any tools that parse /proc/interrupts are supposed not to be affected 
since it was many years we used the format this change converts back to.

Signed-off-by: Maciej W. Rozycki <>
 Original report recorded here: -- 
and given no feedback here is a fix, as promised.  I'll be happy to 
discuss it further if there is any concern about this change.

 Otherwise, please apply.


Index: linux-3.16-dolch/arch/x86/kernel/i8259.c
--- linux-3.16-dolch.orig/arch/x86/kernel/i8259.c
+++ linux-3.16-dolch/arch/x86/kernel/i8259.c
@@ -111,8 +111,7 @@ static void make_8259A_irq(unsigned int 
 	io_apic_irqs &= ~(1<<irq);
-	irq_set_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq,
+	irq_set_chip_and_handler(irq, &i8259A_chip, handle_level_irq);
Index: linux-3.16-dolch/arch/x86/kernel/irqinit.c
--- linux-3.16-dolch.orig/arch/x86/kernel/irqinit.c
+++ linux-3.16-dolch/arch/x86/kernel/irqinit.c
@@ -70,7 +70,6 @@ int vector_used_by_percpu_irq(unsigned i
 void __init init_ISA_irqs(void)
 	struct irq_chip *chip = legacy_pic->chip;
-	const char *name = chip->name;
 	int i;
 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
@@ -79,7 +78,7 @@ void __init init_ISA_irqs(void)
 	for (i = 0; i < nr_legacy_irqs(); i++)
-		irq_set_chip_and_handler_name(i, chip, handle_level_irq, name);
+		irq_set_chip_and_handler(i, chip, handle_level_irq);
 void __init init_IRQ(void)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists