lkml.org 
[lkml]   [2001]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: Long standing bug in alternate stack handling
On Wed, Feb 21, 2001 at 11:02:17PM +0100, Christian Ehrhardt wrote:

Hi,

[ Sorry for the follow up on my own post ]

> If a signal handler is registered with the SA_ONSTACK flag the
> kernel will try to execute the signal handler on the alternate
> stack even if no such stack is registered.

Here's a simple patch for i386. Please consider it for inclusion.
Posix explicitly requires the behaviour implemented by this patch.


--- arch/i386/kernel/signal.c.old Mon Sep 25 22:10:28 2000
+++ arch/i386/kernel/signal.c Sun Apr 22 16:04:47 2001
@@ -371,7 +371,7 @@

/* This is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) {
- if (! on_sig_stack(esp))
+ if (sas_ss_flags(esp) == 0)
esp = current->sas_ss_sp + current->sas_ss_size;
}

NOTE: As far as I can tell all archs are affected by this bug.
best regards Christian Ehrhardt

--
THAT'S ALL FOLKS!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.125 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site