Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753663Ab3IXCor (ORCPT ); Mon, 23 Sep 2013 22:44:47 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:47431 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503Ab3IXCoq (ORCPT ); Mon, 23 Sep 2013 22:44:46 -0400 Date: Tue, 24 Sep 2013 04:44:42 +0200 From: Frederic Weisbecker To: Benjamin Herrenschmidt Cc: Linus Torvalds , Thomas Gleixner , LKML , Paul Mackerras , Ingo Molnar , Peter Zijlstra , "H. Peter Anvin" , James Hogan , "James E.J. Bottomley" , Helge Deller , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Andrew Morton Subject: Re: [RFC GIT PULL] softirq: Consolidation and stack overrun fix Message-ID: <20130924024422.GA13923@localhost.localdomain> References: <1379620267-25191-1-git-send-email-fweisbec@gmail.com> <20130920162603.GA30381@localhost.localdomain> <1379799901.24090.6.camel@pasglop> <1379911234.6625.7.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1379911234.6625.7.camel@pasglop> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1995 Lines: 42 On Mon, Sep 23, 2013 at 02:40:34PM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2013-09-22 at 07:45 +1000, Benjamin Herrenschmidt wrote: > > What I *can* do that would help I suppose would be to switch to the irq > > stack before irq_enter/exit which would at least mean that softirq would > > run from the top of the irq stack which is better than the current > > situation. > > > > I'm fact I'll whip up a quick fix see if that might be enough of a band > > aid for RHEL7. > > OK I've done that, it seems to work so far. Heads up guys: i386 and sparc > at least seem to need the same treatment. I haven't looked at others except > ARM which doesn't seem to have irq stacks to begin with. > > We can also instead apply Fred's series to put back in the switch to the > softirq stack since this is actually a regression , but then, arguably, > making sure irq_exit() is called off the irq stack is better and means > we do one instead of two stack switches. > > Fred: Maybe revert partially under an arch #define/Kconfig so we can get > the best of both worlds ? Aye, I did not realize that's indeed a regression, caused by ("irq: Sanitize invoke_softirq") facd8b80c67a3cf64a467c4a2ac5fb31f2e6745b which converted do_softirq() to __do_softirq() on irq_exit(). It indeed looked like the macro-conditional call was only there for irq disability reasons. But then these crashes... So the safest way to fix this is to unconditionally call do_softirq() from irq_exit(). A performance penalty may come along but safety primes. We should probably do that and work on longer term solutions (Kconfig based arch switch, etc...) for the next merge window? I'll respin the series plus the regression fix, unless somebody has a better solution. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/