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] [day] [month] [year] [list]
Date:	Thu, 20 Dec 2012 10:04:52 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-kernel@...r.kernel.org, Anmar Oueja <anmar.oueja@...aro.org>,
	stable@...nel.org
Subject: Re: [PATCH] mfd: db8500-prcmu: fix irqdomain usage

On Thu, 20 Dec 2012, Linus Walleij wrote:

> On Thu, Dec 20, 2012 at 8:50 AM, Lee Jones <lee.jones@...aro.org> wrote:
> > On Thu, 20 Dec 2012, Grant Likely wrote:
> >>
> >> This looks wrong. It probably works at the moment, but calling
> >> irq_create_mapping when trying to process an IRQ is backwards. There
> >> certainly shouldn't be any processing of an irq that isn't already
> >> mapped. irq_find_mapping() should be used instead.
> >
> > But irq_create_mapping() calls irq_find_mapping() if the irq is
> > already mapped? Or are you saying that if it isn't already mapped
> > then there is an issue somewhere else earlier in the code?
> 
> I've submitted a v2 patch making the changes I think Grant is
> fishing for..
> 
> Basically irq_create_mapping() should be in slowpath and
> irq_find_mapping() in fastpath with the semantics that
> the former has to be called at least once before the other
> is ever called.

Still seems strange to me. Calling irq_create_mapping() on pre-
mapped IRQs is only a few cycles more and it saves the extra
bumph now inserted into patch v2.

> This is not quite trivial to use ... irqdomain seems like it
> will bite us repeatedly for the next few years.

I agree. Personally I like to call irq_create_mapping(), then
I know that if the IRQ isn't already mapped, it soon will be.
This is almost certainly not the way the Grant intended the
API would be used, but seems simpler and diverts the
complexity you speak of above.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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