All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zachary Amsden <zach@vmware.com>
Cc: "linux-os (Dick Johnson)" <linux-os@analogic.com>,
	Coywolf Qi Hunt <coywolf@gmail.com>,
	7eggert@gmx.de, Ukil a <ukil_a@yahoo.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Need help in understanding x86 syscall
Date: Thu, 11 Aug 2005 14:17:28 -0400	[thread overview]
Message-ID: <1123784248.17269.93.camel@localhost.localdomain> (raw)
In-Reply-To: <42FB91FA.7070104@vmware.com>

On Thu, 2005-08-11 at 10:59 -0700, Zachary Amsden wrote:
> 
> zach-dev2:~ $ ldd /bin/ls
>         linux-gate.so.1 =>  (0xffffe000)

OHHH! So THAT is what linux-gate is used for! Thanks, I've been really
confused by that.

> 
> This is the vsyscall entry point, which gets linked by ld into all 
> processes.  It is a kernel page which is visible to user space, and is 
> rewritten to support sysenter if indeed that instruction is available.  
> Glibc has fixed entry points to this page.  Here is a view of the system 
> call entry point on a machine which supports sysenter:
> 
> (gdb) break _init
> Breakpoint 1 at 0x8049522
> (gdb) run
> Starting program: /bin/ls
> (no debugging symbols found)...[Thread debugging using libthread_db enabled]
> [New Thread 1075283616 (LWP 5328)]
> [Switching to Thread 1075283616 (LWP 5328)]
> 
> Breakpoint 1, 0x08049522 in _init ()
> (gdb) x/10i 0xffffe400
> 0xffffe400:     push   %ecx
> 0xffffe401:     push   %edx
> 0xffffe402:     push   %ebp
> 0xffffe403:     mov    %esp,%ebp
> 0xffffe405:     sysenter
> 0xffffe407:     nop   
> 0xffffe408:     nop   
> 0xffffe409:     nop   
> 0xffffe40a:     nop   
> 0xffffe40b:     nop   
> 

OK, I get the same on my machine.

> On a machine that does not support sysenter, this will give you:
> 
> int $0x80
> ret
> 
> The int $0x80 system calls are still fully supported by a sysenter 
> capable kernel, since it must run older binaries and potentially support 
> syscalls during early boot up before it is known that sysenter is supported.

Now is the latest glibc using this.  Since I put in a ud2 op in my
sysenter_entry code, which is not triggered, as well as an objdump of
libc.so shows a bunch of int 0x80 calls.

-- Steve



  reply	other threads:[~2005-08-11 18:17 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4Ae73-6Mm-5@gated-at.bofh.it>
2005-08-11 13:41 ` Need help in understanding x86 syscall 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 [this message]
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
2005-08-11  5:39 Ukil a
2005-08-11 13:54 ` Steven Rostedt
2005-08-11 15:52 ` Zachary Amsden

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=1123784248.17269.93.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=7eggert@gmx.de \
    --cc=coywolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=ukil_a@yahoo.com \
    --cc=zach@vmware.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 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.