[PATCH] i386 TLS_INIT_TP might produce bogus asm changing stack pointer.

Mark Wielaard mjw@redhat.com
Tue Aug 26 12:27:00 GMT 2014


On Tue, 2014-08-26 at 10:34 +0200, Florian Weimer wrote:
> On 08/26/2014 10:27 AM, Mark Wielaard wrote:
> > 	* sysdeps/i386/nptl/tls.h (TLS_INIT_TP): Use INTERNAL_SYSCALL
> > 	to call set_thread_area instead of hand written asm.
> 
> Patch looks good, but you can remove these #defines now:
> 
> # ifdef __PIC__
> #  define TLS_EBX_ARG "r"
> #  define TLS_LOAD_EBX "xchgl %3, %%ebx\n\t"
> # else
> #  define TLS_EBX_ARG "b"
> #  define TLS_LOAD_EBX
> # endif
> 
> (INTERNAL_SYSCALL is not affected by this issue because it uses explicit 
> register constraints, and not the general "r" constraint.)

Yes, you are right. There were some more defines around that block that
are also no longer used. I removed them all (and made sure everything
still builds of course). Updated commit attached.

Thanks,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i386-TLS_INIT_TP-might-produce-bogus-asm-changing-st.patch
Type: text/x-patch
Size: 4081 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140826/f1d2c684/attachment.bin>


More information about the Libc-alpha mailing list