linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: benh@kernel.crashing.org, torvalds@osdl.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org
Subject: Re: [PATCH 2.5.73] Signal stack fixes #1 introduce PF_SS_ACTIVE
Date: Mon, 7 Jul 2003 21:29:35 +1000 (EST)	[thread overview]
Message-ID: <16137.22943.460130.914035@nanango.paulus.ozlabs.org> (raw)
In-Reply-To: <20030706101754.GA23341@wohnheim.fh-wedel.de>

=?iso-8859-1?Q?J=81=F6rn?= Engel writes:

> In the course of the investigation, I found another spot, where we
> didn't get a core dump, which started this whole thread.  Guess what,
> people aren't happy either.  One workaround would be to never use the
> signal stack, but if this can be fixed properly, I would see more
> happy faces at work.  And I like happy faces.

Well, the most reliable way to get a core dump when you trash the
stack or something is to have no SIGSEGV handler at all. :)

In any case, there are all sorts of things that could go wrong and
leave the process stuck in an infinite loop.  If you really want a
core dump when things go wrong then you probably need some sort of
watchdog process plus a way for one process to force another to dump
core and exit (like a SIGKILL but with a core dump as well).

> There is an open source web server that, combined with a closed source
> library, fscks up your stack pointer.  I don't know how they did it

On PPC?  Sounds like you are overrunning an array on the stack and
clearing the stack backchain word.

> and I don't even care.  What I do care about is that it happened, that
> it can happen again any time, and that we handle this problem as
> gracefully as possible.  A core dump is graceful, a do_exit(SIGSEGV),
> as it was in the ppc code is not, and an inifite loop is anything but
> graceful.
> 
> I agree that my initial patch can cause other problems, but the
> problem itself should still get fixed.

You haven't convinced me that the kernel is doing anything wrong or
even suboptimal - it seems to me that you have run into some
unintended consequences of your code, that's all.  You can't expect
the kernel to work around all the bugs in your user processes. :)

Paul.

  reply	other threads:[~2003-07-07 11:23 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 [this message]
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=16137.22943.460130.914035@nanango.paulus.ozlabs.org \
    --to=paulus@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-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;
as well as URLs for NNTP newsgroup(s).