2012/7/23 Ram Tummala <[email protected]>

> On Jul 23, 2012, at 9:32 AM, Fan Yang <[email protected]> wrote:
>
> > hi all:
> >        when I change the cr0 register I get a "Segmentation fault (core
> dumped)".
> >        my code is :
> >
> >
> > .data
> > .text
> > .global _start
> > _start:
> >         movl %eax, %cr0
> >
> >       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?
>
> Changing a control register is a privileged operation. You can't do it
> from the user space. You can only do it from ring 0.
>
> Venkatram Tummala
> >
> >      thanks
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > [email protected]
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
May be I can work it by adding a new syscall in the kernel, right?
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to