From: Zachary Amsden <zach@vmware.com>
To: Ukil a <ukil_a@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Need help in understanding x86 syscall
Date: Thu, 11 Aug 2005 08:52:32 -0700 [thread overview]
Message-ID: <42FB7440.5060501@vmware.com> (raw)
In-Reply-To: <20050811053931.71120.qmail@web51604.mail.yahoo.com>
Ukil a wrote:
>I had this question. As per my understanding, in the
>Linux system call implementation on x86 architecture
>the call flows like this int 0x80 -> syscall ->
>sys_call_vector(taken from the table)-> return from
>interrupt service routine.
>
>
Almost. There are two entry points, the one you describe above, and the
sysenter entry point.
>Now I had the doubt that if the the syscall
>implementation is very large will the scheduling and
>other interrupts be blocked for the whole time till
>the process returns from the ISR (because in an ISR by
>default the interrupts are disabled unless “sti” is
>called explicitly)? That’s appears to be too long for
>the scheduling or other interrupts to be blocked?
>Am I missing something here?
>
>
There are 3 types of gates you can use to service interrupts / faults on
i386. Task gates are used where complex state changes are required, and
an assured state is needed, such as doublefault and NMI handlers.
Interrupt gates are used where interrupts must be disabled during
initial processing, such as the page fault gate. Trap gates are used
when interrupts may be allowed, and do not clear the interrupt flag.
On Linux, syscall vector int 0x80 is a trap gate, which means interrupts
are not disabled. The sysenter handler is very special; SYSENTER does
disable interrupts, so if you look at sysenter_entry, one of the first
things it will do is re-enable interrupts as soon as the stack is sane.
Thus, interrupts are enabled by default during system call processing
unless explicitly disabled.
Your analysis of what would happen otherwise is quite correct.
Zach
next prev parent reply other threads:[~2005-08-11 15:52 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-11 5:39 Need help in understanding x86 syscall Ukil a
2005-08-11 13:54 ` Steven Rostedt
2005-08-11 15:52 ` Zachary Amsden [this message]
[not found] <4Ae73-6Mm-5@gated-at.bofh.it>
2005-08-11 13:41 ` Bodo Eggert
2005-08-11 14:04 ` linux-os (Dick Johnson)
2005-08-11 14:31 ` Steven Rostedt
2005-08-11 15:13 ` Coywolf Qi Hunt
2005-08-11 15:22 ` Steven Rostedt
2005-08-11 15:28 ` linux-os (Dick Johnson)
2005-08-11 15:51 ` Steven Rostedt
2005-08-11 16:19 ` Steven Rostedt
2005-08-11 16:31 ` Coywolf Qi Hunt
2005-08-11 16:59 ` Coywolf Qi Hunt
2005-08-11 17:10 ` linux-os (Dick Johnson)
2005-08-11 17:26 ` Steven Rostedt
2005-08-11 17:33 ` Steven Rostedt
2005-08-11 17:57 ` linux-os (Dick Johnson)
2005-08-11 17:59 ` Zachary Amsden
2005-08-11 18:17 ` Steven Rostedt
2005-08-11 19:58 ` Zachary Amsden
2005-08-11 20:04 ` Steven Rostedt
2005-08-12 19:30 ` Jan Engelhardt
2005-08-11 17:46 ` linux-os (Dick Johnson)
2005-08-11 18:11 ` Steven Rostedt
2005-08-11 18:21 ` linux-os (Dick Johnson)
2005-08-11 19:00 ` Steven Rostedt
2005-08-11 20:39 ` Zwane Mwaikambo
2005-08-12 11:29 ` Bodo Eggert
2005-08-11 17:18 ` Steven Rostedt
2005-08-12 5:04 ` Jeff Carr
2005-08-12 5:30 ` Coywolf Qi Hunt
2005-08-12 10:34 ` Steven Rostedt
2005-08-12 10:40 ` Steven Rostedt
2005-08-11 14:05 ` Steven Rostedt
2005-08-11 23:25 ` Bodo Eggert
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=42FB7440.5060501@vmware.com \
--to=zach@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ukil_a@yahoo.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox