<br><br><div class="gmail_quote">2012/7/23 Ram Tummala <span dir="ltr"><<a href="mailto:venkatram867@gmail.com" target="_blank">venkatram867@gmail.com</a>></span><br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
<div class="HOEnZb"><div class="h5">On Jul 23, 2012, at 9:32 AM, Fan Yang <<a href="mailto:lljyangfan@gmail.com">lljyangfan@gmail.com</a>> wrote:<br>
<br>
> hi all:<br>
> when I change the cr0 register I get a "Segmentation fault (core dumped)".<br>
> my code is :<br>
><br>
><br>
> .data<br>
> .text<br>
> .global _start<br>
> _start:<br>
> movl %eax, %cr0<br>
><br>
> this code can work well in ubuntu system when I use root to run it. So what can I do to work it in redhat system?<br>
</div></div><p>Changing a control register is a privileged operation. You can't do it<br>
from the user space. You can only do it from ring 0.<br>
<br>
Venkatram Tummala<br>
><br>
> thanks<br>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</p><p> </p></blockquote><div>May be I can work it by adding a new syscall in the kernel, right?</div></div>