public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Fabrice Gautier <Fabrice_Gautier@sdesigns.com>
To: 'Jonathan Larmour' <jlarmour@redhat.com>
Cc: "Ecos-List (E-mail)" <ecos-discuss@sourceware.cygnus.com>
Subject: RE: [ECOS] Where is my stack ?! (for my i386)
Date: Thu, 19 Oct 2000 20:33:00 -0000	[thread overview]
Message-ID: <5AF611D83988D4118ACF00E0B10400540557D9@mr-intranet.sdesigns.net> (raw)

> -----Original Message-----
> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Sent: Thursday, October 19, 2000 7:20 PM
> To: Fabrice Gautier
> Cc: Ecos-List (E-mail)
> Subject: Re: [ECOS] Where is my stack ?! (for my i386)
> 
> Fabrice Gautier wrote:
> > 
> 
> It's the startup stack. It's meant to exist very transiently 
> and then get zapped. It's size should be configurable, but it's no big 
> deal if it is discarded later. On some archs the interrupt stack is used
as 
> the startup stack.

Well, it doesn't seem so transient to me. In fact, at least for the x86, as
long as there is no threads, there is only one stack, this one.
So Redboot uses this stack, the standalone stub too.


> > And is there any way to detect a stack overflow when it happens ?
> 
> Generally no, but I believe the x86 can be setup to do this?

It is certainly possible to detect stack overflow for code running in non
privileged level, but for a stack overflow occuring in system mode, I'm not
sure how this can be handled.

For any exception triggered the CPU will try to push some values on this
stack that caused an exception.
Eventually the only way may be to use debug register to set hardware
watchpoint a few byte before the overflow so that the CPU and exception
handler can use the few reamining on the stack. But I don't know if this
idea has ever been used or if this would really work. 


-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

             reply	other threads:[~2000-10-19 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-19 20:33 Fabrice Gautier [this message]
2000-10-19 21:06 ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2000-10-19 17:29 Fabrice Gautier
2000-10-19 19:21 ` Jonathan Larmour

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=5AF611D83988D4118ACF00E0B10400540557D9@mr-intranet.sdesigns.net \
    --to=fabrice_gautier@sdesigns.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=jlarmour@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).