From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: benh@kernel.crashing.org,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
linuxppc-dev@lists.linuxppc.org,
linuxppc64-dev@lists.linuxppc.org
Subject: Re: [PATCH 2.5.73] Signal stack fixes #1 introduce PF_SS_ACTIVE
Date: Fri, 4 Jul 2003 22:18:40 +0200 [thread overview]
Message-ID: <20030704201840.GH22152@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0307041259050.10035-100000@home.osdl.org>
On Fri, 4 July 2003 13:06:50 -0700, Linus Torvalds wrote:
>
> Yeah, basically a lot of old threading stuff did the equivalent of
> longjump by hand.
>
> It is entirely possible that they do not do this out of signal handlers,
> since that has its own set of problems anyway, and one of the reasons for
> doing co-operative user level threading is to not need locking, and thus
> you never want to do any thread switching asynchronously (eg from a signal
> context).
>
> So I'm not saying that your patch will necessarily break stuff, I'm just
> pointing out that it was actually done the way it is done on purpose.
And there actually is a possibility for my patch to break things.
Davide's example should still work, but there may be others. Point
taken.
> Sure it does. It can detect just about _any_ brokenness, except for the
> very rare case of total stack pointer corruption.
Well, that rare case is one that some people are quite concerned
about. The sigaltstack is nice because it reduces the likelyhood, but
it doesn't cure the paranoia completely.
> The people who use it tend to do user-space memory management, and for
> example put hard limits on their stack usage - possibly because they have
> a lot of stacks because they use threads.
>
> Most of the time if the original stack is blown, the fault is
> non-recoverable. But you can use the alternate stack to either just give a
> nice debug message (even in the presense of otherwise non-recoverable
> errors), _or_ you can actually do things like fix up the stack
> dynamically.
Both of which I want to have, right.
> Quite frankly, for the recursive SIGSEGV problem, I'd much rather look at
> the signal mask. If SIGSEGV is blocked, we should probably just kill the
> program instead of clearing the blocking and trying to handle the SIGSEGV
> anyway. That should fix your test case, _without_ any subtle side effects.
What do we do, if a program also uses SA_NOMASK for the SIGSEGV
handler? This is totally stupid, I agree, but it is legal. Should we
declare it illegal from this day on, or is that path blocked as well?
Jörn
--
When in doubt, use brute force.
-- Ken Thompson
next prev parent reply other threads:[~2003-07-04 20:04 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 ` [PATCH 2.5.73] Signal handling fix for ppc Jörn Engel
2003-07-04 23:26 ` 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 [this message]
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=20030704201840.GH22152@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=torvalds@osdl.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 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®