This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add GLIBC_PTHREAD_ELISION_ENABLE tunable
- From: Kalle Olavi Niemitalo <kon at iki dot fi>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 11 Sep 2015 23:57:19 +0300
- Subject: Re: [PATCH] Add GLIBC_PTHREAD_ELISION_ENABLE tunable
- Authentication-results: sourceware.org; auth=none
- Keywords: S390
- References: <55F33220 dot 8050105 at linux dot vnet dot ibm dot com>
"Paul E. Murphy" <murphyp@linux.vnet.ibm.com> writes:
> int elision_available = (GLRO (dl_hwcap) & HWCAP_S390_TE) ? 1 : 0;
>
> + /* Check environment to see if we should disable LE. */
> + for (; *environ != NULL; environ++)
> + if (strcmp (*environ, "GLIBC_PTHREAD_ELISION_ENABLE=no") == 0)
> + __pthread_force_elision = 0;
> +
> __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
This does not make sense, any value assigned to
__pthread_force_elision in the loop will be overwritten without
reading after the loop.