SHA256
1
0
forked from pool/glibc

Accepting request 511655 from home:Andreas_Schwab:Factory

- s390-elision-enable-envvar.patch: enable TLE only if
  GLIBC_ELISION_ENABLE=yes is defined (fate#322271)

OBS-URL: https://build.opensuse.org/request/show/511655
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=465
This commit is contained in:
Andreas Schwab 2017-07-20 12:59:14 +00:00 committed by Git OBS Bridge
parent b0e33f9762
commit 8c4777bd8f
7 changed files with 58 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 20 12:17:21 UTC 2017 - schwab@suse.de
- s390-elision-enable-envvar.patch: enable TLE only if
GLIBC_ELISION_ENABLE=yes is defined (fate#322271)
-------------------------------------------------------------------
Wed Jun 21 15:15:12 UTC 2017 - schwab@suse.de

View File

@ -227,6 +227,8 @@ Patch15: glibc-2.3.90-langpackdir.diff
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
# PATCH-FEATURE-SLE s390: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
Patch22: s390-elision-enable-envvar.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
@ -487,6 +489,7 @@ rm nscd/s-stamp
%patch15 -p1
%patch19 -p1
%patch21 -p1
%patch22 -p1
%patch100 -p1
%patch102 -p1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 20 12:17:21 UTC 2017 - schwab@suse.de
- s390-elision-enable-envvar.patch: enable TLE only if
GLIBC_ELISION_ENABLE=yes is defined (fate#322271)
-------------------------------------------------------------------
Wed Jun 21 15:15:12 UTC 2017 - schwab@suse.de

View File

@ -228,6 +228,8 @@ Patch15: glibc-2.3.90-langpackdir.diff
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
# PATCH-FEATURE-SLE s390: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
Patch22: s390-elision-enable-envvar.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
@ -488,6 +490,7 @@ rm nscd/s-stamp
%patch15 -p1
%patch19 -p1
%patch21 -p1
%patch22 -p1
%patch100 -p1
%patch102 -p1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 20 12:17:21 UTC 2017 - schwab@suse.de
- s390-elision-enable-envvar.patch: enable TLE only if
GLIBC_ELISION_ENABLE=yes is defined (fate#322271)
-------------------------------------------------------------------
Wed Jun 21 15:15:12 UTC 2017 - schwab@suse.de

View File

@ -233,6 +233,8 @@ Patch15: glibc-2.3.90-langpackdir.diff
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
# PATCH-FEATURE-SLE s390: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
Patch22: s390-elision-enable-envvar.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
@ -493,6 +495,7 @@ rm nscd/s-stamp
%patch15 -p1
%patch19 -p1
%patch21 -p1
%patch22 -p1
%patch100 -p1
%patch102 -p1

View File

@ -0,0 +1,31 @@
Index: glibc-2.25/sysdeps/unix/sysv/linux/s390/elision-conf.c
===================================================================
--- glibc-2.25.orig/sysdeps/unix/sysv/linux/s390/elision-conf.c
+++ glibc-2.25/sysdeps/unix/sysv/linux/s390/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. */
@@ -64,7 +65,17 @@ elision_init (int argc __attribute__ ((u
When false elision is never attempted. */
int elision_available = (GLRO (dl_hwcap) & HWCAP_S390_TE) ? 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;
+ }
+ }
}
#ifdef SHARED