SHA256
1
0
forked from pool/glibc

Accepting request 377337 from home:Andreas_Schwab:Factory

- powerpc-elision-enable-envvar.patch: enable TLE only if
  GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)

OBS-URL: https://build.opensuse.org/request/show/377337
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=430
This commit is contained in:
Andreas Schwab 2016-03-22 10:25:18 +00:00 committed by Git OBS Bridge
parent 13c9b7363d
commit db39c1fdd1
7 changed files with 89 additions and 18 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 21 11:57:49 UTC 2016 - schwab@suse.de
- powerpc-elision-enable-envvar.patch: enable TLE only if
GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)
-------------------------------------------------------------------
Tue Mar 15 10:44:46 UTC 2016 - schwab@suse.de

View File

@ -210,6 +210,8 @@ Patch15: glibc-2.3.90-langpackdir.diff
Patch18: glibc-cpusetsize.diff
# PATCH-FEATURE-SLE Use nscd user for nscd
Patch19: nscd-server-user.patch
# PATCH-FEATURE-SLE powerpc: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
Patch21: powerpc-elision-enable-envvar.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
@ -238,6 +240,10 @@ Patch306: glibc-fix-double-loopback.diff
###
# Patches from upstream
###
# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
Patch1000: resolv-mem-leak.patch
# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
Patch1001: no-long-double.patch
###
# Patches awaiting upstream approval
@ -256,12 +262,8 @@ Patch2004: fnmatch-collating-elements.patch
Patch2005: nss-files-long-lines-2.patch
# PATCH-FIX-UPSTREAM Fix iconv buffer handling with IGNORE error handler (BZ #18830)
Patch2006: iconv-reset-input-buffer.patch
# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
Patch2007: resolv-mem-leak.patch
# PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
Patch2008: reinitialize-dl_load_write_lock.patch
# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
Patch2009: no-long-double.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages
@ -451,6 +453,7 @@ rm nscd/s-stamp
%patch15 -p1
%patch18 -p1
%patch19 -p1
%patch21 -p1
%patch100 -p1
%patch102 -p1
@ -463,6 +466,9 @@ rm nscd/s-stamp
%patch304 -p1
%patch306 -p1
%patch1000 -p1
%patch1001 -p1
%patch2000 -p1
%patch2001 -p1
%patch2002 -p1
@ -470,9 +476,7 @@ rm nscd/s-stamp
%patch2004 -p1
%patch2005 -p1
%patch2006 -p1
%patch2007 -p1
%patch2008 -p1
%patch2009 -p1
%patch3000

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 21 11:57:49 UTC 2016 - schwab@suse.de
- powerpc-elision-enable-envvar.patch: enable TLE only if
GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)
-------------------------------------------------------------------
Tue Mar 15 10:44:46 UTC 2016 - schwab@suse.de

View File

@ -209,6 +209,8 @@ Patch15: glibc-2.3.90-langpackdir.diff
Patch18: glibc-cpusetsize.diff
# PATCH-FEATURE-SLE Use nscd user for nscd
Patch19: nscd-server-user.patch
# PATCH-FEATURE-SLE powerpc: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
Patch21: powerpc-elision-enable-envvar.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
@ -237,6 +239,10 @@ Patch306: glibc-fix-double-loopback.diff
###
# Patches from upstream
###
# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
Patch1000: resolv-mem-leak.patch
# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
Patch1001: no-long-double.patch
###
# Patches awaiting upstream approval
@ -255,12 +261,8 @@ Patch2004: fnmatch-collating-elements.patch
Patch2005: nss-files-long-lines-2.patch
# PATCH-FIX-UPSTREAM Fix iconv buffer handling with IGNORE error handler (BZ #18830)
Patch2006: iconv-reset-input-buffer.patch
# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
Patch2007: resolv-mem-leak.patch
# PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
Patch2008: reinitialize-dl_load_write_lock.patch
# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
Patch2009: no-long-double.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages
@ -451,6 +453,7 @@ rm nscd/s-stamp
%patch15 -p1
%patch18 -p1
%patch19 -p1
%patch21 -p1
%patch100 -p1
%patch102 -p1
@ -463,6 +466,9 @@ rm nscd/s-stamp
%patch304 -p1
%patch306 -p1
%patch1000 -p1
%patch1001 -p1
%patch2000 -p1
%patch2001 -p1
%patch2002 -p1
@ -470,9 +476,7 @@ rm nscd/s-stamp
%patch2004 -p1
%patch2005 -p1
%patch2006 -p1
%patch2007 -p1
%patch2008 -p1
%patch2009 -p1
%patch3000

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 21 11:57:49 UTC 2016 - schwab@suse.de
- powerpc-elision-enable-envvar.patch: enable TLE only if
GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)
-------------------------------------------------------------------
Tue Mar 15 10:44:46 UTC 2016 - schwab@suse.de

View File

@ -210,6 +210,8 @@ Patch15: glibc-2.3.90-langpackdir.diff
Patch18: glibc-cpusetsize.diff
# PATCH-FEATURE-SLE Use nscd user for nscd
Patch19: nscd-server-user.patch
# PATCH-FEATURE-SLE powerpc: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
Patch21: powerpc-elision-enable-envvar.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
@ -238,6 +240,10 @@ Patch306: glibc-fix-double-loopback.diff
###
# Patches from upstream
###
# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
Patch1000: resolv-mem-leak.patch
# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
Patch1001: no-long-double.patch
###
# Patches awaiting upstream approval
@ -256,12 +262,8 @@ Patch2004: fnmatch-collating-elements.patch
Patch2005: nss-files-long-lines-2.patch
# PATCH-FIX-UPSTREAM Fix iconv buffer handling with IGNORE error handler (BZ #18830)
Patch2006: iconv-reset-input-buffer.patch
# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
Patch2007: resolv-mem-leak.patch
# PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
Patch2008: reinitialize-dl_load_write_lock.patch
# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
Patch2009: no-long-double.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages
@ -451,6 +453,7 @@ rm nscd/s-stamp
%patch15 -p1
%patch18 -p1
%patch19 -p1
%patch21 -p1
%patch100 -p1
%patch102 -p1
@ -463,6 +466,9 @@ rm nscd/s-stamp
%patch304 -p1
%patch306 -p1
%patch1000 -p1
%patch1001 -p1
%patch2000 -p1
%patch2001 -p1
%patch2002 -p1
@ -470,9 +476,7 @@ rm nscd/s-stamp
%patch2004 -p1
%patch2005 -p1
%patch2006 -p1
%patch2007 -p1
%patch2008 -p1
%patch2009 -p1
%patch3000

View File

@ -0,0 +1,41 @@
2016-02-11 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/powerpc/elision-conf.c
(elision_init): Further restrict enablement based
on whether GLIBC_ELISION_ENABLE=yes is in the env.
---
sysdeps/unix/sysv/linux/powerpc/elision-conf.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Index: glibc-2.22/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
===================================================================
--- glibc-2.22.orig/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
+++ glibc-2.22/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
@@ -21,6 +21,7 @@
#include <elision-conf.h>
#include <unistd.h>
#include <dl-procinfo.h>
+#include <string.h>
/* Reasonable initial tuning values, may be revised in the future.
This is a conservative initial value. */
@@ -61,7 +62,18 @@ elision_init (int argc __attribute__ ((u
{
#ifdef ENABLE_LOCK_ELISION
int elision_available = (GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_HTM) ? 1 : 0;
- __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
+
+ /* Scan the environment and conditionally enable TLE. */
+ if (elision_available != 0 && __libc_enable_secure == 0)
+ {
+ for ( ; *environ != NULL; environ++)
+ if (**environ == 'G' &&
+ strcmp (*environ,"GLIBC_ELISION_ENABLE=yes") == 0)
+ {
+ __pthread_force_elision = elision_available;
+ break;
+ }
+ }
#endif
if (!__pthread_force_elision)
/* Disable elision on rwlocks. */