All of lore.kernel.org
 help / color / mirror / Atom feed
* syscall descriptor table
@ 2012-04-05 21:55 Xin Tong
  2012-04-06  8:24 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Xin Tong @ 2012-04-05 21:55 UTC (permalink / raw)
  To: linux-kernel

Can anyone please describe to me how x86 syscall works ( i.e. how it
is dispatched to the correct function) on x86 ?

mov $1, %eax   ;; __NR_exit = 1
mov $42, %ebx  ;; status = 42
sysenter       ;; perform the syscall!

what does the sysenter instruction do ? what is the difference aganst int 0x80.

Thanks

Xin

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: syscall descriptor table
  2012-04-05 21:55 syscall descriptor table Xin Tong
@ 2012-04-06  8:24 ` Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2012-04-06  8:24 UTC (permalink / raw)
  To: Xin Tong; +Cc: linux-kernel, Jiri Slaby

On 04/05/2012 11:55 PM, Xin Tong wrote:
> Can anyone please describe to me how x86 syscall works ( i.e. how it
> is dispatched to the correct function) on x86 ?
> 
> mov $1, %eax   ;; __NR_exit = 1
> mov $42, %ebx  ;; status = 42
> sysenter       ;; perform the syscall!
> 
> what does the sysenter instruction do ? what is the difference aganst int 0x80.

Please refer to some processor manual. For example: Intel 64 and IA-32
Architectures Software Developer’s Manual. For the entry point see
ia32_sysenter_target in arch/x86/kernel/entry_32.S for x86_32 or
arch/x86/ia32/ia32entry.S for x86_64 with 32-bit binary.

regards,
-- 
js
suse labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-06  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05 21:55 syscall descriptor table Xin Tong
2012-04-06  8:24 ` Jiri Slaby

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.