All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Linux kernel <linux-kernel@vger.kernel.org>
Subject: question on do_sigaltstack() -- want to allow nested calls
Date: Tue, 05 Oct 2004 11:09:40 -0600	[thread overview]
Message-ID: <4162D554.5010109@nortelnetworks.com> (raw)


The man page says that you can't call sigaltstack() while you are actually in 
the alternate stack.

I have an emulator app that wants to do some special stuff, and it seems to 
require nested calls. [1]

So...

Is it enough in this case to simply bypass the "if (on_sig_stack(sp))" check in 
do_sigaltstack()?

Chris









1: Here's why I want to do this, if anyone is interested.

case 1: --the segfault handler is set to run on alt stack, and tries to do some 
fancy stuff to trace the call chain
	--would like to set up alternate stack for SIGSEGV then drop block on that 
signal, while still in the handler for the first instance.  If we get the second 
fault, then we die a bit more messily.

case 2: --emulator software sets up handler for SIGTRAP on alt stack
	--some routines then have to run code in software being emulated, but we don't 
trust it
	--would like to set up alternate stacks for signals, then drop blocks on them 
and run code being emulated, while still running the first handler





                 reply	other threads:[~2004-10-05 17:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4162D554.5010109@nortelnetworks.com \
    --to=cfriesen@nortelnetworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.