diff --git a/packages/devel/glibc/patches/arm/glibc-tls-libwidevinecdm.so-since-4.10.2252.0-has-TLS-with.patch b/packages/devel/glibc/patches/arm/glibc-tls-libwidevinecdm.so-since-4.10.2252.0-has-TLS-with.patch new file mode 100644 index 0000000000..1a84602b10 --- /dev/null +++ b/packages/devel/glibc/patches/arm/glibc-tls-libwidevinecdm.so-since-4.10.2252.0-has-TLS-with.patch @@ -0,0 +1,31 @@ +From 61b3b546450ae0a70cb4a57fbb0e0fc47b331370 Mon Sep 17 00:00:00 2001 +From: Portisch +Date: Sat, 5 Jun 2021 19:41:25 +0200 +Subject: [PATCH] tls: libwidevinecdm.so: since 4.10.2252.0 has TLS with + 64-byte alignment Change the max_align to 64U instead 16 to make it possible + to use dlopen again. Tests by changing TLS_TCB_ALIGN directly showed up some + random crashes. Reverence: https://lkml.org/lkml/2020/7/3/754 + +--- + elf/dl-tls.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/elf/dl-tls.c b/elf/dl-tls.c +index 9fa62f5d..d8f2f740 100644 +--- a/elf/dl-tls.c ++++ b/elf/dl-tls.c +@@ -213,6 +213,11 @@ void + _dl_determine_tlsoffset (void) + { + size_t max_align = TLS_TCB_ALIGN; ++ /* libwidevinecdm.so: since 4.10.2252.0 has TLS with 64-byte alignment. ++ Since TLS is initialized before audit modules are loaded and slotinfo ++ information is available, this is not taken into account below in ++ the audit case. */ ++ max_align = MAX (max_align, 64U); + size_t freetop = 0; + size_t freebottom = 0; + +-- +2.31.1 +