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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0908161601570.2782@localhost.localdomain>
Date:	Sun, 16 Aug 2009 16:25:13 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Michael Buesch <mb@...sch.de>
cc:	linux-kernel@...r.kernel.org
Subject: Re: Threaded interrupt handlers broken?

On Sun, 16 Aug 2009, Michael Buesch wrote:
> On Sunday 16 August 2009 15:22:29 Thomas Gleixner wrote:
>
> > > +		if (0&&unlikely(desc->status & IRQ_DISABLED)) {
> > 
> > So the interrupt is marked disabled. How do you setup the handler
> > ?  And what does the primary handler do ? Can you post your driver
> > code please?
> 
> This patch converts the b43 driver to threaded interrupts:
> http://bu3sch.de/patches/wireless-testing/20090816-1535/patches/002-b43-threaded-irq-handler.patch

On the first glance this looks not too bad. the unlocked access to the
irq status registers looks a bit scary, but that is not relevant for
the problem at hand.
 
> It kind of works with this hack applied to kernel/irq/manage.c

Hmm. Is the interrupt of the device shared ? If yes, what's the other
device on that interrupt line ? what puzzles me is the fact that the
IRQ_DISABLED flag is set. Is there anything unusual in dmesg ?

> > So you wake when the thread counter is != 0 after the decrement.
> > 
> >  #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
> 
> Yeah, isn't that what we want to do? I read the test as "wake other threads,
> if there are other threads" or something like that.

No, it's for synchronize_irq(). When there are threaded handlers in
progress, then sychronize_irq() waits on the waitqueue until they are
finished. So we wake the queue when the last threaded handler of this
irq line returns from thread_fn.

Thanks,

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