* [octeon]segment without execution priviledge,causing system down.
@ 2010-04-28 1:29 wilbur.chan
2010-04-28 5:01 ` David Daney
0 siblings, 1 reply; 2+ messages in thread
From: wilbur.chan @ 2010-04-28 1:29 UTC (permalink / raw)
To: Linux MIPS Mailing List
I'm using a modified kernel version derived from 2.6.21.7,and the cpu
is octeon cn5860. Strangely I found that , when executing
some instruction in un-executable segment, the system will hang on,
together with console down, and could not response to ping
command.
cn5860 has 16 CPUs, in our system , each non-zero cpu is running a
real-time user-mode process with 99 priority(network
business) , causing non-zero cpus to 100% cpu-usage.
while cpu 0 ,is in charge of coordinating the whole system ,almost to
5~6% cpu-usage.
That is , the following code ,will cause a problem , which hang the
cpu 0, and then hang the whole system:
#include <stdio.h>
#include <stdlib.h>
char stack[8*1024] = {0}; // in un-executable segment
void (*func)(void);
int main()
{
func = (void (*)(void))stack; //convert to function pointer
func(); //cpu will hang
return 0;
}
In my opinion, the code above should generate a page_fault exception ,
and caused SIGSEGV error, however in my
system , it hang on directly.
Any one knows why this happened? Thanks
regards,
wilbur
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [octeon]segment without execution priviledge,causing system down.
2010-04-28 1:29 [octeon]segment without execution priviledge,causing system down wilbur.chan
@ 2010-04-28 5:01 ` David Daney
0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2010-04-28 5:01 UTC (permalink / raw)
To: wilbur.chan; +Cc: Linux MIPS Mailing List, David Daney
On 04/27/2010 06:29 PM, wilbur.chan wrote:
> I'm using a modified kernel version derived from 2.6.21.7,and the cpu
> is octeon cn5860. Strangely I found that , when executing
>
> some instruction in un-executable segment, the system will hang on,
> together with console down, and could not response to ping
>
> command.
>
[...]
> Any one knows why this happened? Thanks
>
I think I know.
There is a bug in your kernel. Since execute inhibit support was not
added to the upstream kernel until very recently, we must assume you got
your kernel from some vendor. You could either ask the vendor for a
fix, or back port it yourself from:
http://www.linux-mips.org/git?p=linux.git;a=commitdiff;h=6dd9344cfc41bcc60a01cdc828cb278be7a10e01
David Daney
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-28 5:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-28 1:29 [octeon]segment without execution priviledge,causing system down wilbur.chan
2010-04-28 5:01 ` David Daney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.