All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.