Roland McGrath wrote::
>> I spent some time read you mail carefully and dig into the code again.
>>
>> And yes, you are right. It's possible that SA_ONSTACK has been cleared
>> before the second signal on the same stack comes.
>
> It's not necessary for SA_ONSTACK to have "been cleared", by which
Roland McGrath wrote::
>> You mean the comment?
>
> No, that is trivial and already corrected. I mean the substance of your
> most recent patch. I described why I think it is wrong. You did not respond.
I spent some time read you mail carefully and dig into the code again.
And yes, you are ri
riginal comment untouched.
Sorry for my poor English. :(
Thanks
Shi Weihua
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
n apllied by Ingo.
Please refer to http://lkml.org/lkml/2008/2/18/575 and
http://lkml.org/lkml/2008/2/19/119 .
Thanks.
Shi Weihua
>
> If you are already on the signal stack, it doesn't matter whether the
> signal that just arrived has SA_ONSTACK set or not. If you are going to
>
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to ia64_ia32 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTEC
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to ia64 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
--
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to x86_ia32 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTEC
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to x86_64 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
--
We need to check for stack overflow only when the signal is on stack.
So we can improve the patch "http://lkml.org/lkml/2007/11/27/101"; as following.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
The previous patch has a comment mistake. Now I correct it.
---
--- linux
[EMAIL PROTECTED] wrote::
> On Mon, 18 Feb 2008 18:22:05 +0800, Shi Weihua said:
>
>> -/*
>> - * If we are on the alternate signal stack and would overflow it, don't.
>notice
> this ^
>
Matthew Wilcox wrote::
> On Mon, Feb 18, 2008 at 06:26:23PM +0800, Shi Weihua wrote:
>> +if (!rbs_on_sig_stack(scr->pt.ar_bspstore))
>> +new_rbs = (current->sas_ss_sp +
>> + sizeof
Ingo Molnar wrote::
> * Shi Weihua <[EMAIL PROTECTED]> wrote:
>
>> We need to check for stack overflow only when the signal is on stack.
>> So we can improve the patch "http://lkml.org/lkml/2007/11/27/101"; as
>> following.
>
> hm, does this
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to ia64_ia32 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTEC
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to ia64 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTEC
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to x86_64 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTEC
The similar check has been added to x86_32(i386) in commit
id 83bd01024b1fdfc41d9b758e5669e80fca72df66.
So we add this check to x86_ia32 and improve it a liitle bit in that
we need to check for stack overflow only when the signal is on stack.
Signed-off-by: Shi Weihua <[EMAIL PROTEC
We need to check for stack overflow only when the signal is on stack.
So we can improve the patch "http://lkml.org/lkml/2007/11/27/101"; as following.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
--- linux-2.6.25-rc2.orig/arch/x86/kernel/signal_32.c 2008-02-16
04:57:20
Fix the following compile warning without CONFIG_PREEMPT_RT:
kernel/timer.c:937: warning: ‘count_active_rt_tasks’ defined but not used
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
diff -urpN linux-2.6.24-rt1.orig/kernel/timer.c linux-2.6.24-rt1/kernel/timer.c
--- linux-2.6.24-rt
>
I am sorry, i don't understand how this is related to the semantics of e.g.
longjmp.
But, i am sure my patch solves all overflows. Ingo's patch can't catch the
overflow
which is caught by "int i[1000];" in the handler function.
Do you have more idea for me? Thanks.
Not all the return value of __copy_from_user and
__put_user is checked.This patch fixed it.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
diff -x '*.o*' -urp linux-2.6.24-rc3-git6.orig/arch/ia64/kernel/signal.c
linux-2.6.24-rc3-git6/arch/ia64/kernel/signal.c
--- linux-2.6.
n");
return -1;
}
memset(&action, 0, sizeof(action));
action.sa_handler = segv_handler;
action.sa_flags = SA_ONSTACK | SA_NODEFER;
sigemptyset(&action.sa_mask);
sigaction(SIGSEGV, &action, NULL);
*c = 0; //SEGV
if (!s)
free(s);
.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
diff -urp linux-2.6.24-rc3-git1.orig/arch/ia64/kernel/signal.c
linux-2.6.24-rc3-git1/arch/ia64/kernel/signal.c
--- linux-2.6.24-rc3-git1.orig/arch/ia64/kernel/signal.c2007-11-17
13:16:36.0 +0800
+++ linux-2.6.24-rc3
vice about storing the previous esp?
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
diff -urpN linux-2.6.24-rc2.orig/arch/x86/kernel/signal_32.c
linux-2.6.24-rc2/arch/x86/kernel/signal_32.c
--- linux-2.6.24-rc2.orig/arch/x86/kernel/signal_32.c 2007-11-13
14:30:45.0 +0800
+++ linux
.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
---
diff -urp linux-2.6.24-rc2.orig/arch/ia64/kernel/signal.c
linux-2.6.24-rc2/arch/ia64/kernel/signal.c
--- linux-2.6.24-rc2.orig/arch/ia64/kernel/signal.c 2007-11-09
14:38:53.0 +0800
+++ linux-2.6.24-rc2/arch/ia64/kernel/signa
Mikael Pettersson wrote::
On Thu, 4 Oct 2007 21:47:30 +0900, KAMEZAWA Hiroyuki wrote:
On Thu, 04 Oct 2007 21:33:12 +0900
Shi Weihua <[EMAIL PROTECTED]> wrote:
KAMEZAWA Hiroyuki wrote::
On Thu, 04 Oct 2007 20:56:14 +0900
Shi Weihua <[EMAIL PROTECTED]> wrote:
stack.
KAMEZAWA Hiroyuki wrote::
On Thu, 04 Oct 2007 20:56:14 +0900
Shi Weihua <[EMAIL PROTECTED]> wrote:
stack.ss_sp = addr + pagesize;
stack.ss_flags = 0;
stack.ss_size = pagesize;
Here is bad.
stack,ss_sp = addr;
stack.ss_flags = 0;
stack.ss_size = pagesize * 2;
ot;);
return -1;
}
memset(&action, 0, sizeof(action));
action.sa_handler = segv_handler;
action.sa_flags = SA_ONSTACK | SA_NODEFER;
sigemptyset(&action.sa_mask);
sigaction(SIGSEGV, &action, NULL);
*c = 0;
Mikael Pettersson wrote::
On Wed, 03 Oct 2007 17:06:24 +0900, Shi Weihua wrote:
Fixing alternative signal stack wraparound.
If a process uses alternative signal stack by using sigaltstack()
and that stack overflow, stack wraparound occurs.
This patch checks whether the signal frame is on the
process
forcedly
then the process will be terminated.
This patch is for i386,version is 2.6.23-rc8.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
diff -pur linux-2.6.23-rc8.orig/arch/i386/kernel/signal.c
linux-2.6.23-rc8/arch/i386/kernel/signal.c
--- linux-2.6.23-rc8.orig/arch/i386/kernel/si
process
forcedly
then the process will be terminated.
This patch is for ia64,version is 2.6.23-rc8.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
diff -pur linux-2.6.23-rc8.orig/arch/ia64/ia32/ia32_signal.c
linux-2.6.23-rc8/arch/ia64/ia32/ia32_signal.c
--- linux-2.6.23-rc8.orig/arch/ia6
process
forcedly
then the process will be terminated.
This patch is for x86-64,version is 2.6.23-rc8.
Signed-off-by: Shi Weihua <[EMAIL PROTECTED]>
diff -pur linux-2.6.23-rc8.orig/arch/x86_64/ia32/ia32_signal.c
linux-2.6.23-rc8/arch/x86_64/ia32/ia32_signal.c
--- linux-2.6.23-rc8.orig/arch/
+ int i[1000];
+
int *c = NULL;
counter++;
printf("%d\n", counter);
---
I think the "int i[1000];" make the signal frame not to be checked by the added
code in my patch.
But I don't know how
32 matches
Mail list logo