From: venkatram867@gmail.com (Ram Tummala)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How can I change cr0 register in redhat system
Date: Mon, 23 Jul 2012 09:49:35 +0530 [thread overview]
Message-ID: <-6574249348144482851@unknownmsgid> (raw)
In-Reply-To: <CAPihQtsduGcSV16ood+nHXBZEcYXNBx45pX9s87mLekXt_vQuA@mail.gmail.com>
On Jul 23, 2012, at 9:32 AM, Fan Yang <lljyangfan@gmail.com> 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
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2012-07-23 4:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 4:00 How can I change cr0 register in redhat system Fan Yang
2012-07-23 4:19 ` Ram Tummala [this message]
2012-07-23 8:37 ` siddharth saxena
2012-07-23 11:40 ` Jonathan Neuschäfer
[not found] ` <219833562776487968@unknownmsgid>
2012-07-23 13:38 ` Fan Yang
2012-07-23 14:01 ` Jonathan Neuschäfer
2012-07-23 17:38 ` Ram Tummala
2012-07-24 2:05 ` Peter Teoh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=-6574249348144482851@unknownmsgid \
--to=venkatram867@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.