Date: Sat, 21 Dec 2002 07:20:02 -0800 (PST) From: David Malone <dwmalone@maths.tcd.ie> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/46258: PLT code causes skewed return hint stack Message-ID: <200212211520.gBLFK2Hu033149@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/46258; it has been noted by GNATS. From: David Malone <dwmalone@maths.tcd.ie> To: Torbjorn Granlund <tege@swox.com> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: i386/46258: PLT code causes skewed return hint stack Date: Sat, 21 Dec 2002 15:16:41 +0000 On Sat, Dec 14, 2002 at 05:29:33PM +0100, Torbjorn Granlund wrote: > If using a jmp is impossible, we could live with getting one > return hint stack miss, but we don't want the entire hint stack > to become skewed. Shouldn't the code look like the > following instead? I turned your suggestion into a patch, to make it clearer what it changes. Can you suggest some code to measure if this makes a measurable difference? David. diff -u -r1.3 rtld_start.S --- i386/rtld_start.S 28 Aug 1999 00:10:15 -0000 1.3 +++ i386/rtld_start.S 21 Dec 2002 15:11:06 -0000 @@ -77,8 +77,9 @@ call _rtld_bind@PLT # Transfer control to the binder /* Now %eax contains the entry point of the function being called. */ - - addl $8,%esp # Discard binder arguments + call 1f # Balance call stack for return hinting +1: + addl $12,%esp # Discard binder arguments movl %eax,20(%esp) # Store target over obj argument popl %ecx # Restore %ecx popl %edx # Restore %edx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212211520.gBLFK2Hu033149>