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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101124084653.GG2212@linux-sh.org>
Date:	Wed, 24 Nov 2010 17:46:53 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Haojian Zhuang <haojian.zhuang@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [question] NR_IRQS in genirq

On Wed, Nov 24, 2010 at 03:28:37PM +0800, Haojian Zhuang wrote:
> Hi all,
> 
> I'm using the latest kernel 2.6.37-rc1. Now I met some issues on genirq.
> 
> 1. While SPARSE IRQ is enabled, nr_irqs may be larger than NR_IRQS.
> But the allocated_irqs bitmap (kernel/irq/irqdesc.c) is restricted in
> NR_IRQS. Is it an issue?
> 
> 2. irqs_resend bitmap of kernel/irq/resend.c is also restricted in
> NR_IRQS. Is it an issue, too?
> 
Perhaps something like:

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 9988d03..11bd76c 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -215,6 +215,11 @@ int __init early_irq_init(void)
 	initcnt = arch_probe_nr_irqs();
 	printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
 
+	if (unlikely(nr_irqs > NR_IRQS)) {
+		WARN(1, "Probed more than NR_IRQS, chomping.\n");
+		nr_irqs = NR_IRQS;
+	}
+
 	for (i = 0; i < initcnt; i++) {
 		desc = alloc_desc(i, node);
 		set_bit(i, allocated_irqs);

?
--
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