From: Andi Kleen <andi@firstfloor.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, sandeen@sandeen.net
Subject: Re: [PATCH] i386: Execute stack overflow warning on interrupt stack II
Date: Mon, 05 May 2008 12:17:41 +0200 [thread overview]
Message-ID: <481EDEC5.10000@firstfloor.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0805051135530.3318@apollo.tec.linutronix.de>
Thomas Gleixner wrote:
> On Fri, 2 May 2008, Andi Kleen wrote:
>> +static void stack_overflow(void)
>> +{
>> + printk("low stack detected by irq handler\n");
>
> Needs a KERN_ERR
Just moving code. If there is one added it should be in another patch.
Besides if anything it's a KERN_WARN I guess.
>
>> + /* Execute warning on interrupt stack */
>> + if (unlikely(overflow))
>> + call_on_stack2(stack_overflow, isp, 0, 0);
>> +
>> + call_on_stack2(desc->handle_irq, isp, irq, desc);
>
> arch/x86/kernel/irq_32.c:148: warning: passing argument 2 of ‘call_on_stack2’ makes integer from pointer without a cast
> arch/x86/kernel/irq_32.c:150: warning: passing argument 2 of ‘call_on_stack2’ makes integer from pointer without a cast
> arch/x86/kernel/irq_32.c:150: warning: passing argument 4 of ‘call_on_stack2’ makes integer from pointer without a cast
Hmm, strange. I don't see that here
CC arch/x86/kernel/irq_32.o
CC arch/x86/kernel/time_32.o
gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
What compiler are you using? Or did you change anything? (I know you
like to do that)
>> } else
>> #endif
>> - desc->handle_irq(irq, desc);
>> + {
>> + /* AK: Slightly bogus here */
>
> Bogus comment. This applies to both the !4KSTACKS and the overflow of
> the irq stack in the 4KSTACKS case.
The comment refers to that the check here doesn't check the process
stack, but the interrupt stack. In fact if the interrupt stack is near
overflow we should probably just reject the interrupt? Although that
might cause hangs too. Or perhaps just enlarge it [that is now possible
with i386 pda with some effort]. Anyways it is probably not an
interesting case because nested interrupts are rare.
>> + if (overflow)
>
> unlikely(overflow) ?
Doesn't matter really. The whole branch is unlikely.
-Andi
next prev parent reply other threads:[~2008-05-05 10:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 9:18 [PATCH] i386: Execute stack overflow warning on interrupt stack Andi Kleen
2008-05-02 9:45 ` Jiri Slaby
2008-05-02 9:48 ` Andi Kleen
2008-05-02 9:45 ` [PATCH] i386: Execute stack overflow warning on interrupt stack II Andi Kleen
2008-05-05 9:59 ` Thomas Gleixner
2008-05-05 10:17 ` Andi Kleen [this message]
2008-05-05 12:39 ` Thomas Gleixner
2008-05-05 13:13 ` Eric Sandeen
2008-05-05 13:29 ` Andi Kleen
2008-05-05 13:42 ` Pekka Enberg
2008-05-05 13:45 ` Andi Kleen
2008-05-05 13:42 ` [PATCH] i386: Execute stack overflow warning on interrupt stack Eric Sandeen
2008-05-05 13:47 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481EDEC5.10000@firstfloor.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sandeen@sandeen.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox