linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Blaisorblade <blaisorblade@yahoo.it>,
	"Christopher S. Aker" <caker@theshore.net>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] SIGSEGV and SA_NODEFER
Date: Tue, 18 Jan 2005 16:28:42 -0500	[thread overview]
Message-ID: <200501182128.j0ILSgxi013966@ccure.user-mode-linux.org> (raw)

It turns out that caker's crashes were being caused by the lack of SA_NODEFER
in the SIGSEGV handler registration.

I know I fixed this, and I have no idea where the fix went.  Do you have any
clue what happened to it?

Patch below...

				Jeff

Index: 2.6.10/arch/um/kernel/process.c
===================================================================
--- 2.6.10.orig/arch/um/kernel/process.c        2005-01-17 12:27:47.000000000 -0500
+++ 2.6.10/arch/um/kernel/process.c     2005-01-18 13:55:28.000000000 -0500
@@ -60,7 +60,10 @@
 {
        int flags = altstack ? SA_ONSTACK : 0;
 
-       set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags,
+       /* SIGSEGV needs to be SA_NODEFER because segfaults can happen while
+        * the segfault handler is on the stack.
+        */
+       set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags | SA_NODEFER,
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
        set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, 
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2005-01-18 19:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-18 21:28 Jeff Dike [this message]
2005-01-20  0:07 ` [uml-devel] SIGSEGV and SA_NODEFER Blaisorblade
2005-01-20  3:52   ` Rob Landley
2005-01-21 12:35     ` Blaisorblade
2005-01-21 18:18       ` Rob Landley
2005-01-21 19:58         ` Blaisorblade
2005-01-22 16:34           ` Rob Landley
2005-01-24 19:45             ` Blaisorblade
2005-01-25  1:38               ` Rob Landley
     [not found]               ` <20050125084506.GA562@bytesex>
2005-01-25 10:16                 ` Blaisorblade
2005-01-25 10:16                   ` Rob Landley
2005-01-25 11:40                     ` Blaisorblade
2005-01-25 17:30                       ` Rob Landley
2005-01-25 19:34                         ` Blaisorblade
2005-01-25 19:30                           ` Rob Landley
2005-01-25 20:50                             ` Blaisorblade
2005-01-25 22:43                               ` Rob Landley
2005-01-21 13:09   ` Blaisorblade
2005-01-21 16:56     ` Jeff Dike

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=200501182128.j0ILSgxi013966@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=blaisorblade@yahoo.it \
    --cc=caker@theshore.net \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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