On Tue, 2006-08-08 at 10:43 -0400, Manu Garg wrote: > On 8/5/06, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote: > > On Fri, 2006-08-04 at 13:00 -0400, Manu Garg wrote: > > > I am writing this to announce an article on "sysenter" way of doing > > > systems calls in newer linux kernels. Here is the link: > > > http://manugarg.blogspot.com/2006/07/sysenter-based-system-call-mechanism.html > > > > > > Abstract: > > > > Hi, > > > > it's good to see articles like this written. I have one important thing > > that really should be fixed in it though: You mention several times that > > the address of the vdso page is 0xffffe400 and you even show an example > > where userspace calls that address directly. THIS IS WRONG!!! > > > > This address is not fixed, and not an ABI and in fact it is changing > > already in 2.6.18. The actual ABI convention is that the kernel informs > > userspace of the address via an AT_ elf parameter (AT_SYSINFO to be > > exact), and applications should use the address they get from this, not > > the hardcoded value! > > Thanks for mentioning it and the information. I need some more help it > seems. What I see in gdb is: > call *%gs:0x10 > > I am not able to figure out how is that related to AT_SYSINFO elf > parameter. Can you help me understand that? You see, I am not so good > at ABI stuff. glibc puts the AT_SYSINFO value, at startup, in the memory location that %gs:0x10 points to. %gs points to a per-thread area in memory (the so called Thread Local Storage area) and glibc at start parses the AT_ values and places this one there; this means you don't have to parse this info yourself from the stack (which is somewhat complex I suppose) but just have glibc do the hard work and use that.. -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/