Re: Doubts in System call mechanism in linux

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

 



On 5/10/10 6:37 PM, Balachandar wrote:
Hello,
  We transit from ring3 to ring0 using 'int' or the new 'syscall/sysenter' instruction. Does that mean that the page tables and other stuffs that needs to be modified for the kernel is automatically done by the 'int' instruction or the interrupt handler for the 'int 0x80' will do the required stuff and jump to the respective system call.


Also when returning from a system call, we again need to go to user space. For this we need to know the instruction address in the user space to continue the user application. Where is that address stored. Does the 'ret' instruction automatically changes the ring from ring3 to ring0 or where/how this ring changing mechanism takes place?

Then, i read that changing from ring3 to ring0 is not as costly as changing from ring0 to ring3. Why is this so??


Thanks,

Bala

Hi Bala,

Have you referred this?

http://tldp.org/HOWTO/html_single/Implement-Sys-Call-Linux-2.6-i386/

http://www.ibm.com/developerworks/linux/library/l-system-calls/index.html

Daniel

[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