Re: Interpreting the EIP register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting MAASK Group <maask12345@hotmail.com>:

> Hi,
>    I wanted to know how to convert the user-mode EIP value into the 
> virtual/physical address of the instruction it points to. Also is is 
> supposed to be fixed? Does a change in the user-mode EIP value indicate a 
> fault?
>    I checked the intel manual site... but couldnt not find out the exact 
> significance of the contents of the EIP register.
> 
> Thanks in advance,
> Asmita
> (MAASK)
> 

EIP holds the instruction pointer in intel architecture. EIP contains the 
linear address of the next instruction within the code segment to be 
executed.The combination of CS:EIP is called the logical address. In protected 
mode,this is acted upon by the segmentation unit (hardware) to get the linear 
address.This address can be thought of as an index in to the 4GB linear
(virtual) address space of the process.This further gets acted upon by the 
paging unit to get converted to the physical address(actual RAM).
So these are the series of steps that happen during address 
translation.Basically if the user mode EIP doesn't change you cannot execute 
the next instruction at all.
For further reference read 
Intel arch manual 
Understanding linux kernel book.

-sridhar
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux