All of lore.kernel.org
 help / color / mirror / Atom feed
* question on do_sigaltstack() -- want to allow nested calls
@ 2004-10-05 17:09 Chris Friesen
  0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2004-10-05 17:09 UTC (permalink / raw)
  To: Linux kernel


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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-05 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-05 17:09 question on do_sigaltstack() -- want to allow nested calls Chris Friesen

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.