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:	Thu, 17 Sep 2015 22:13:31 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Caesar Wang <caesar.upstream@...il.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	Caesar Wang <wxt@...k-chips.com>
Subject: Re: [PATCH 1/3] clocksource: rockchip: Make the driver more
 readability and compatible

On Thu, Sep 17, 2015 at 12:57:53PM +0200, Daniel Lezcano wrote:
> Hi Thomas,
> 
> there is one thing I don't understand.
> 
> If the IRQ0 is invalid, irq_of_parse_and_map returning zero means an error
> and from what you said it is ok.
> 
> But I see the NO_IRQ on ARM is (-1) and the drivers are checking with NO_IRQ
> the return code of irq_of_parse_and_map. So if there is an error, that won't
> be detected.

NO_IRQ being -1 is a legacy thing for ARM - all ARM drivers are supposed
to be converted to use <= 0 or == 0 to detect invalid IRQs, and _eventually_
once all users are gone, NO_IRQ deleted.

Moreover, there are supposed to be no _new_ users of NO_IRQ ever added to
the kernel.

Modern drivers should _all_ be using !irq to detect invalid IRQs, and not
using NO_IRQ.

The steps here are:

1. Convert all ARM platforms to start numbering IRQs from 1 rather than 0.
2. Convert all drivers used on ARM to detect lack of IRQ by checking for
   <= 0.
3. Replace NO_IRQ assignments with zero-initialisations.
4. Remove NO_IRQ.

The reason it hasn't happened is that it requires effort and testing,
and rather than running around getting old platforms to boot (which
includes remembering _how_ to get them to boot) with recent kernels,
I prefer to spend my time doing more productive work with modern code.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
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