title: get segmentation fault when executing shellcode
body: <p>I 'm trying to execute program with shell code injected into stack (program getting from securityTube.net tutorial , Megaprimer buffer overflow ) very good site (<a href="http://www.securitytube.net/" rel="nofollow">http://www.securitytube.net/</a>)</p>
  
  <p>Our  shellcode.c  is :  </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  char shellcode[]="\xb0\x01\x31\xdb\xcd\x80";
  main()
  {
    int *p;
    p=(int *)&amp;p+2;
    (*p)=(int)shellcode;
  }
  </code></pre>
  
  <p>I compiled with <code>fno-stack-protector</code> and <code>-z execstack</code> to disable stack protection, even with these parameters I get segmentation fault, 
  our shellcode is simply syscall for exit() function, with gdb I noticed that segmentation fault was raised when hiting command <code>int $x80</code> inside shellcode.
  perhaps there is another security param blocking our shellcode </p>
  
  <p>any suggestions pls </p>