Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-27 Thread Shi Weihua
Roland McGrath wrote:: > cf http://lkml.org/lkml/2007/10/3/41 > > To summarize: on Linux, SA_ONSTACK decides whether you are already on the > signal stack based on the value of the SP at the time of a signal. If > you are not already inside the range, you are not "on the signal stack" > and so

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-27 Thread Roland McGrath
> thanks Roland for the detailed analysis. I've queued up the patch below > in the x86 tree. I suspect we can wait with this for v2.6.25, due to > this being long-standing behavior of Linux? Thus we could observe the > effects of this patch for a longer time. It's certainly nothing new. The

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-27 Thread Ingo Molnar
* Roland McGrath <[EMAIL PROTECTED]> wrote: [...] > I think it would be sensible for the signal handler setup code to > detect when it would itself be causing a stack overflow. Maybe > something like the following patch (untested). This issue exists in > the same way on all machines, so

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-27 Thread Ingo Molnar
* Roland McGrath [EMAIL PROTECTED] wrote: [...] I think it would be sensible for the signal handler setup code to detect when it would itself be causing a stack overflow. Maybe something like the following patch (untested). This issue exists in the same way on all machines, so ideally

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-27 Thread Roland McGrath
thanks Roland for the detailed analysis. I've queued up the patch below in the x86 tree. I suspect we can wait with this for v2.6.25, due to this being long-standing behavior of Linux? Thus we could observe the effects of this patch for a longer time. It's certainly nothing new. The

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-27 Thread Shi Weihua
Roland McGrath wrote:: cf http://lkml.org/lkml/2007/10/3/41 To summarize: on Linux, SA_ONSTACK decides whether you are already on the signal stack based on the value of the SP at the time of a signal. If you are not already inside the range, you are not on the signal stack and so the new

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-26 Thread Roland McGrath
cf http://lkml.org/lkml/2007/10/3/41 To summarize: on Linux, SA_ONSTACK decides whether you are already on the signal stack based on the value of the SP at the time of a signal. If you are not already inside the range, you are not "on the signal stack" and so the new signal handler frame starts

Re: Fw: Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs

2007-11-26 Thread Roland McGrath
cf http://lkml.org/lkml/2007/10/3/41 To summarize: on Linux, SA_ONSTACK decides whether you are already on the signal stack based on the value of the SP at the time of a signal. If you are not already inside the range, you are not on the signal stack and so the new signal handler frame starts