public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@argo.co.il>
To: Bill Irwin <bill.irwin@oracle.com>,
	Arjan van de Ven <arjan@infradead.org>,
	Hugh Dickins <hugh@veritas.com>,
	Chuck Ebbert <cebbert@redhat.com>,
	Andi Kleen <andi@firstfloor.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Wanted: simple, safe x86 stack overflow detection
Date: Thu, 08 Mar 2007 09:43:47 +0200	[thread overview]
Message-ID: <45EFBEB3.20708@argo.co.il> (raw)
In-Reply-To: <20070307144816.GQ18774@holomorphy.com>

Bill Irwin wrote:
> On Tue, 2007-03-06 at 22:44 -0800, Bill Irwin wrote:
>   
>>> What do you see as the obstacle to eliminating nested IRQ's?
>>>       
>
> On Wed, Mar 07, 2007 at 04:34:52AM -0800, Arjan van de Ven wrote:
>   
>> political will, or maybe just the lack of convincing people so far
>>     
>
> Political issues are significantly more difficult to resolve than
> technical ones.
>
>
> On Tue, 2007-03-06 at 22:44 -0800, Bill Irwin wrote:
>   
>>>  It doesn't
>>> seem so far out to test for being on the interrupt stack and defer the
>>> call to do_IRQ() until after the currently-running instance of do_IRQ()
>>> has returned, or to move to per-irq stacks modulo special arrangements
>>> for the per-cpu IRQ's. Or did you have other methods in mind?
>>>       
>
> On Wed, Mar 07, 2007 at 04:34:52AM -0800, Arjan van de Ven wrote:
>   
>> it's simpler...
>> irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
>> { 
>>         irqreturn_t ret, retval = IRQ_NONE;
>>         unsigned int status = 0;
>>
>>         handle_dynamic_tick(action);
>>    
>>         if (!(action->flags & IRQF_DISABLED))
>>                 local_irq_enable_in_hardirq();
>>
>> just removing the if() and the explicit IRQ enabling already makes irqs no longer nest...
>>     
>
> I can see why that would raise eyebrows. I can see getting bashed
> mercilessly with interrupt latency concerns as a result here. Can you
> suggest any defenses?
>   

I don't understand why interrupt latency suffers.  Sure, the interrupt 
that's being masked is delayed, but on the other hand the interrupt 
that's doing the masking is not.  We're moving the latency from the 
first interrupt to the second, probably with a slight gain in overall 
throughput.

It *does* matter if the interrupts have meaningful priorities.  Is that 
the case here?

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


  parent reply	other threads:[~2007-03-08  7:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 14:27 Wanted: simple, safe x86 stack overflow detection Chuck Ebbert
2007-02-28 16:31 ` Thiago Galesi
2007-02-28 20:41 ` Andi Kleen
2007-02-28 23:20   ` Bill Irwin
2007-02-28 23:36     ` Jan Engelhardt
2007-02-28 23:45       ` Bill Irwin
2007-03-04  1:50   ` Bill Irwin
2007-03-06 18:59     ` Chuck Ebbert
2007-03-06 19:43       ` Hugh Dickins
2007-03-06 20:34         ` Bill Irwin
2007-03-07  4:28           ` Arjan van de Ven
2007-03-07  6:44             ` Bill Irwin
2007-03-07 12:34               ` Arjan van de Ven
2007-03-07 14:48                 ` Bill Irwin
2007-03-07 15:04                   ` Arjan van de Ven
2007-03-08  7:43                   ` Avi Kivity [this message]
2007-03-19 20:53                     ` Eric W. Biederman
2007-03-06 20:06       ` Bill Irwin
2007-03-05  1:18 ` Arnd Bergmann
2007-03-05 12:39   ` 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=45EFBEB3.20708@argo.co.il \
    --to=avi@argo.co.il \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=bill.irwin@oracle.com \
    --cc=cebbert@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /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