From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: benh@kernel.crashing.org
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org,
linuxppc64-dev@lists.linuxppc.org, paulus@au.ibm.com,
anton@au.ibm.com, engebret@us.ibm.com
Subject: [PATCH 2.5.73] Signal handling fix for ppc
Date: Fri, 4 Jul 2003 19:58:59 +0200 [thread overview]
Message-ID: <20030704175859.GF22152@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20030704175439.GE22152@wohnheim.fh-wedel.de>
Hi!
This patch causes an application with a broken stack to die with a
SIGSEGV (and a core dump and all that) instead of a silent do_exit.
Most other architectures already have it, so ppc should get it as
well.
Anton, did I understand it correctly that you already have the
equivalent for ppc64 in the queue?
Jörn
--
With a PC, I always felt limited by the software available. On Unix,
I am limited only by my knowledge.
-- Peter J. Schoenster
--- linux-2.5.73/arch/ppc/kernel/signal.c~sigsegv_ppc 2003-07-03 19:17:21.000000000 +0200
+++ linux-2.5.73/arch/ppc/kernel/signal.c 2003-07-04 19:01:55.000000000 +0200
@@ -234,7 +234,9 @@
return 0;
badframe:
- do_exit(SIGSEGV);
+ if (sig == SIGSEGV)
+ ka->sa.sa_handler = SIG_DFL;
+ force_sig(SIGSEGV, current);
}
static void
@@ -285,7 +287,9 @@
printk("badframe in setup_rt_frame, regs=%p frame=%p newsp=%lx\n",
regs, frame, newsp);
#endif
- do_exit(SIGSEGV);
+ if (sig == SIGSEGV)
+ ka->sa.sa_handler = SIG_DFL;
+ force_sig(SIGSEGV, current);
}
/*
@@ -332,7 +336,9 @@
return 0;
badframe:
- do_exit(SIGSEGV);
+ if (sig == SIGSEGV)
+ ka->sa.sa_handler = SIG_DFL;
+ force_sig(SIGSEGV, current);
}
/*
@@ -375,7 +381,9 @@
printk("badframe in setup_frame, regs=%p frame=%p newsp=%lx\n",
regs, frame, newsp);
#endif
- do_exit(SIGSEGV);
+ if (sig == SIGSEGV)
+ ka->sa.sa_handler = SIG_DFL;
+ force_sig(SIGSEGV, current);
}
/*
@@ -462,7 +470,9 @@
regs, frame, *newspp);
printk("sc=%p sig=%d ka=%p info=%p oldset=%p\n", sc, sig, ka, info, oldset);
#endif
- do_exit(SIGSEGV);
+ if (sig == SIGSEGV)
+ ka->sa.sa_handler = SIG_DFL;
+ force_sig(SIGSEGV, current);
}
/*
next prev parent reply other threads:[~2003-07-04 17:45 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-03 20:24 [PATCH 2.5.73] Fix broken signal optimization for i386 Jörn Engel
2003-07-04 17:43 ` Jörn Engel
2003-07-04 17:45 ` [PATCH 2.5.73] Signal stack fixes #1 introduce PF_SS_ACTIVE Jörn Engel
2003-07-04 17:51 ` [PATCH 2.5.73] Signal stack fixes #2 i386-specific Jörn Engel
2003-07-04 17:54 ` [PATCH 2.5.73] Signal stack fixes #1 introduce PF_SS_ACTIVE Jörn Engel
2003-07-04 17:58 ` Jörn Engel [this message]
2003-07-04 23:26 ` [PATCH 2.5.73] Signal handling fix for ppc Paul Mackerras
2003-07-05 7:33 ` Jörn Engel
2003-07-04 23:18 ` [PATCH 2.5.73] Signal stack fixes #1 introduce PF_SS_ACTIVE Paul Mackerras
2003-07-05 7:39 ` Jörn Engel
2003-07-06 8:47 ` Paul Mackerras
2003-07-06 10:17 ` Jörn Engel
2003-07-07 11:29 ` Paul Mackerras
2003-07-07 11:58 ` Jörn Engel
2003-07-07 11:33 ` Paul Mackerras
2003-07-07 11:46 ` Jörn Engel
2003-07-04 19:21 ` Linus Torvalds
2003-07-04 19:38 ` Jörn Engel
2003-07-04 20:06 ` Linus Torvalds
2003-07-04 20:18 ` Jörn Engel
2003-07-05 0:39 ` Linus Torvalds
2003-07-05 7:30 ` Jörn Engel
2003-07-05 10:44 ` Jörn Engel
2003-07-05 17:16 ` Linus Torvalds
2003-07-06 12:51 ` Jörn Engel
2003-07-07 9:30 ` [PATCH 2.5.74] Signal stack safety #2 i386 specific Jörn Engel
2003-07-05 17:06 ` [PATCH 2.5.73] Signal stack fixes #1 introduce PF_SS_ACTIVE Jamie Lokier
2003-07-06 1:27 ` Eric W. Biederman
2003-07-04 19:39 ` Davide Libenzi
2003-07-04 20:24 ` Jörn Engel
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=20030704175859.GF22152@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=anton@au.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=engebret@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=paulus@au.ibm.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
all inboxes | Powered by JetHome®