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, 22 Apr 2012 14:17:55 -0400
From:	"jonsmirl@...il.com" <jonsmirl@...il.com>
To:	lkml <linux-kernel@...r.kernel.org>,
	ARM Linux Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: irqdomains and irq_domain_add_linear

On ARM with the current Linus tree the irqdomain code doesn't work if
you have multiple linear domains. In my case I have two interrupt
controllers. As the device tree is parsed interrupts get randomly
assigned from each of the two domains. These IRQs get assigned
sequentially ascending VIRQ numbers and sequentially ascending
descriptors.

But then when an interrupt happens, the ARM interrupt handler looks
the interrupt up in the descriptor array. This array is based on virq,
not hwirq. As soon as the 1:1 relationship of virq to hwirq is broken
(it got broken by alternating assignments to the interrupt
controllers) the descriptor lookup stops working since it retrieves
the wrong descriptor. In my case it made the console fail making it
difficult to debug what was happening. I reverted back to
irq_domain_add_legacy() which keeps the 1:1 mapping and everything
started working again.

My initial through to fix this was to add a revmap look up in the
interrupt handler. But a better way might be to keep the descriptor
array corresponding to hwirq instead of virq.

-- 
Jon Smirl
jonsmirl@...il.com
--
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