sysenter on x86
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
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 to0xffffe000works.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.
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-printableQuoted 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 to0xffffe000works. =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_SYSINFOelf flag. The kernel is free to move this address around between builds, as long asAT_SYSINFOgives 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