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]
Date:	Mon, 12 Jan 2009 00:05:32 +0300
From:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
To:	Daniel Drake <dsd@...too.org>
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	klausman@...too.org, rth@...ddle.net
Subject: Re: cant compile on alpha with gcc-4.3 and CONFIG_ALPHA_NAUTILUS

On Sat, Jan 10, 2009 at 11:54:15AM +0000, Daniel Drake wrote:
> To fix this, we could remove -Werror or we could restructure the irq_srm
> code so that it is only compiled on systems that use it. One small
> function (srm_device_interrupt) is used all over the place so would have
> to be separated. Patch attached, which has been compile-tested on nautilus. 
> The disadvantage is that srm_device_interrupt() is now built on all alpha 
> sys types, but it is so small that it doesn't seem worth creating its own 
> file or creating ifdef spaghetti.
>
> Thoughts?

Your patch looks fine, but there is simpler fix which makes the compiler
to optimize problematic code away on systems with NR_IRQS <= 16.

Ivan.

diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c
index 3221201..a03fbca 100644
--- a/arch/alpha/kernel/irq_srm.c
+++ b/arch/alpha/kernel/irq_srm.c
@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
 {
 	long i;
 
+	if (NR_IRQS <= 16)
+		return;
 	for (i = 16; i < max; ++i) {
 		if (i < 64 && ((ignore_mask >> i) & 1))
 			continue;
--
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