Skip to contentSkip to conversation

sysenter on x86

DISCUSSION Felix von Leitner 3 participants 3 messages Apr 12, 2003 – Apr 14, 2003

lore
Share & tools
lore
#0 lore raw

I just added sysenter support for linux-2.5 on x86 to the diet libc, but I noted that the original patch said user space should jump to 0xfffff000, which segfaults. Jumping to 0xffffe000 works.

I suggest adding a comment somewhere in the kernel about the proper calling convention, because the glibc code is frankly not readable in this regard.

Also, I suggest adding this interface to kernel 2.4 to easy binary compatibility.

Felix

#1 lore raw
Quoted 7 lines · Felix von Leitner

I just added sysenter support for linux-2.5 on x86 to the diet libc, but I noted that the original patch said user space should jump to 0xfffff000, which segfaults. Jumping to 0xffffe000 works.

I suggest adding a comment somewhere in the kernel about the proper calling convention, because the glibc code is frankly not readable in this regard.

you HAVE to use the location as specified with the AT_SYSINFO elf flag. The kernel is free to move this address around between builds, as long as AT_SYSINFO gives the address for the location.

#2 lore raw
Followup to:  <[email protected]>
By author:    Arjan van de Ven <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 15 lines

--=-EFK+Hzuvs0Z6BUNjBVGk
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Quoted 7 lines · Felix von Leitner

I just added sysenter support for linux-2.5 on x86 to the diet libc, but I noted that the original patch said user space should jump to 0xfffff000, which segfaults. Jumping to 0xffffe000 works. =20
I suggest adding a comment somewhere in the kernel about the proper calling convention, because the glibc code is frankly not readable in this regard.

Quoted 4 lines

you HAVE to use the location as specified with the AT_SYSINFO elf flag. The kernel is free to move this address around between builds, as long as AT_SYSINFO gives the address for the location.

... which quite frankly kind of bites :(

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64