[Top] [All Lists]

[octeon]segment without execution priviledge,causing system down.

To: Linux MIPS Mailing List <>
Subject: [octeon]segment without execution priviledge,causing system down.
From: "wilbur.chan" <>
Date: Wed, 28 Apr 2010 09:29:27 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=BHcZ0m0MMKlI3wImDAJ1o8XGrfwa8NKaSq4K3Kgo3Hs=; b=dJ+IpibCbZTJ4a+03npewFm+gbVtKLTTYkHh8Amords43bxPfbByMSawn3GvMoE5gX Jpn3B9CCgjPhTdy3sNQFsqhRGMGdBx8GHqJNUC/AArWenMoVy6QUEQl1oZ6ChNvQ+jyD bFioqLzt87ZHLr0cWEYFXfzXa8KIlbLKQwIps=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=wSH/pOjmvVmSQTm2YMCkp82Mx2Oa6OBDyCL8WlHj+BI2oESYIgGX/D+WlLfxaKbR/j a3MMr2v5rgPvIkQbVuwBEs6C0CEC75lhbKpEU7LrxaYYWlFCGZ2FgMginWf5f2IrXM+i 32luE08oRMhYG6eYTioqZrXm5eutdD8n7MerU=
Original-recipient: rfc822;
I'm using a modified kernel version derived from,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


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



<Prev in Thread] Current Thread [Next in Thread>