This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] i386 TLS_INIT_TP might produce bogus asm changing stack pointer.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Mark Wielaard <mjw at redhat dot com>, libc-alpha at sourceware dot org
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Tue, 26 Aug 2014 10:34:34 +0200
- Subject: Re: [PATCH] i386 TLS_INIT_TP might produce bogus asm changing stack pointer.
- Authentication-results: sourceware.org; auth=none
- References: <1409041665-1558-1-git-send-email-mjw at redhat dot com>
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.)
--
Florian Weimer / Red Hat Product Security