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, 25 Mar 2010 17:33:59 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Andi Kleen <andi@...stfloor.org>, x86@...nel.org,
	LKML <linux-kernel@...r.kernel.org>, jesse.brandeburg@...el.com
Subject: Re: [PATCH] Prevent nested interrupts when the IRQ stack is near
 overflowing v2


* Ingo Molnar <mingo@...e.hu> wrote:

> 
> * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> 
> [...]
> >
> > Now, it's also true that our IRQ infrastructure handlers _could_ be smarter, 
> > and make the whole problem less likely to happen.
> > 
> > In particular, it's probably true that especially on modern hardware with 
> > multiple cores, and especially when you do _not_ have irq sharing (which is 
> > the common case these days for things like network drivers that can use 
> > MSI), we really would be better off having the irq disabled over the whole 
> > thing, and on some interrupt controllers it might even be worth it to do the 
> > old optimization of not masking-and-acking, but just acking.
> 
> Yes.
> 
> > But see above. This is _not_ something that a driver can do any more. They 
> > don't know whether the interrupt might end up being shared. Just blindly 
> > setting IRAF_DISABLED in a driver is _not_ the answer. But being smarter in 
> > the generic irq handler code might work.
> > 
> > And then, what we could do, is to mark the drivers that absolutely _must_ 
> > be able to nest specially. Like the IDE driver when in PIO mode. Or maybe 
> > the SCSI drivers, if they still depend on that timer interrupt happening 
> > while they are busy.
> 
> I think the patch as posted solves a real problem, but also perpetuates a 
> bad situation.
> 
> At minimum we should print a (one-time) warning that some badness occured. 
> That would push us either in the direction of improving drivers, or towards 
> improving the generic code.

Furthermore, applying that patch as-is would not just cause us to do nothing 
about it in the future, it would also add a rather fragile looking piece of 
logic. I.e. it's a sweep-under-the-rug thing pretty much IMO.

So i think Thomas is quite right wrt. ugliness of the patch but missed the 
other important fact that this can occur in a lot of places with high enough 
IRQ parallelism and cannot be fixed one by one.

Thanks,

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