Re: Re: Re: kernel preemption while returning from interrupts

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

 



Hello...

> As far as I know, exceptions (CPU on occurence of exception) do not
> disable the interrupts and nor even the exception handlers. I dont
> know why the check for interrupts being disabled (IF flag pushed on
> to stack) is done here. I am not able to figure out any case where
> this check is useful. May be somebody else on this mailing list be
> able to help us in understanding this.

This is what I read in Intel Architecture Software Developer's Manual 
Volume 1. On section 6.4.1, you will read that for interrupt gates, CPU 
will automatically clear IF flag before pushing it to kernel stack.

Now head back to arch/i386/kernel/traps.c. You will see that two 
exceptions are using interrupt gate. They are debug exception and NMI. 
Other exceptions are using trap gate, so they don't clear IF flag 
before pushing it to kernel stack. Again, this is all done by the CPU, 
not by any kernel code.

Sorry for making mistakes. I hope I can clear up the issues for you and 
everybody else who read this thread. 

regards

Mulyadi


--
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