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:	Tue, 26 Sep 2006 09:15:32 -0700 (PDT)
From:	Linus Torvalds <torvalds@...l.org>
To:	David Woodhouse <dwmw2@...radead.org>
cc:	Jeff Garzik <jgarzik@...ox.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	David Howells <dhowells@...hat.com>,
	Al Viro <viro@....linux.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] restore libata build on frv



On Tue, 26 Sep 2006, David Woodhouse wrote:
>
> On Tue, 2006-09-26 at 04:52 -0400, Jeff Garzik wrote:
> > The irq is a special case no matter how we try to prettyify it.  We need 
> > two irqs, and PCI only gives us one per device. 
> 
> That's fine -- but don't use zero to mean none. We have NO_IRQ for that,
> and zero isn't an appropriate choice.

Zero _is_ an appropriate choice, dammit!

That NO_IRQ thing should be zero, and any architecture that thinks that 
zero is a valid IRQ just needs to fix its own irq mapping so that the 
"cookie" doesn't work.

The thing is, it's zero. Get over it. It can't be "-1" or some other 
random value like people have indicated, because that thing is often read 
from places where "-1" simply isn't a possible value (eg it gets its 
default value initialized from a "unsigned char" in MMIO space on x86).

So instead of making everybody and their dog to silly things with some 
NO_IRQ define that they haven't historically done, the rule is simple: "0" 
means "no irq", so that you can test for it with obvious code like

	if (!dev->irq)
		..

and then, if your actual _hardware_ things that the bit-pattern with all 
bits clear is a valid irq that can be used for normal devices, then what 
you do is you add a irq number translation layer (WHICH WE NEED AND HAVE 
_ANYWAY_) and make sure that nobody sees that on a _software_ level.

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